Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 27, practice 2 doesn't actually differentiate between ints and floats #983

Open
jman904 opened this issue Aug 24, 2024 · 1 comment
Labels
bug Something isn't working as intended content Issues with the lessons, practices, including their code examples

Comments

@jman904
Copy link

jman904 commented Aug 24, 2024

the following solution still passes all the checks (probably due to dynamic casting):


var whole_number: int = 4.1
var text: String = "Hello, world!"
var vector: Vector2 = Vector2(1, 1)
var decimal_number: float = 3
@jman904 jman904 added the content Issues with the lessons, practices, including their code examples label Aug 24, 2024
@NathanLovato NathanLovato added the bug Something isn't working as intended label Aug 24, 2024
@NathanLovato
Copy link
Contributor

That's a good catch :)

Thanks for taking the time to open issues. The Godot 3 type checker doesn't error on that. We've cheated a bunch in practice checks in this app. Here, we'd need to do some minimal parsing of the code to make it robust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended content Issues with the lessons, practices, including their code examples
Projects
None yet
Development

No branches or pull requests

2 participants