Godot Version
4.6
Question
Should I do
var x := get_x() as my_class
or
var x = get_x() as my_class
I know that as will set x as my_class if get_x() returns object of my_class or null if it wasn’t my_class. And I know that single : without any give type, sets variable type depending on what is on the other side.
Both lines of code, that I put above, work the same from my testing and both give hints.
I’m just curious if there is any real difference I didn’t notice or something I should know.