Replies: 3 comments 1 reply
-
It used to be directly comparable to false but was changed to be more explicit. Also: use if_instance_valid(_sub_node) |
Beta Was this translation helpful? Give feedback.
0 replies
-
This was done by design, see: And as suggested above the proper way is to use |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A freed object is a , also treated as a null value.
For some types, there is no way to convert it into a bool, but it can be asserted directly, which turn out to be an opposite result.
So if I want to check existence of an object, I should use
if _sub_node != null
rather thanif _sub_node
. It's counterintuitive, isn't it?Beta Was this translation helpful? Give feedback.
All reactions