Summary
Take for instance this variable: Counter ?int
.
If I wanted to check that this variable is null, I would do:
if (Counter = false)
So logically, if I wanted to check that this variable isn’t null, I should be able to do:
if (Counter = true)
However, it does not seem to work. It always returns false
.
Is it intended behavior? Or am I missing something?
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
- Have a nullable (option) variable, like such:
?type
, - Compare it with
true
in anif
statement.
Expected Result
If the variable has a value, it should return true
.
Observed Result
Even when the variable has a value, it returns false
.
Platform(s)
Desktop (I expect all platforms to behave the same).
Island Code
0000-0000-0000