Replies: 1 comment 1 reply
-
This is fixed in 4.0, maybe its impossible to backport. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am aware of the benefits of static typing and I like good style. And at the same time:
func _get(property: String) -> Variant: ....
as a result: error: The identifier "Variant" isn't a valid type
This is strange, given that it is "The most important data type in Godot". When I read TypeScript and see any, I know what the function returns. When I read GDScript and don't see anything (because then it would be Variant), I think "Oops! I forgot to type here!😯" Why not add the ability to specify a Variant without an error for the code analyzer? After all, in fact, all that needs to be done is simply to remove the error when specifying it.
Beta Was this translation helpful? Give feedback.
All reactions