How to check if value is null, today?
tastyminerals
tastyminerals at gmail.com
Thu Oct 14 11:58:29 UTC 2021
The new `DMD v2.097.2` deprecated implicit null conversions
`std.typecons.Nullable!double.Nullable.get_`.
The deprecation warning tell you to `Please use .get explicitly.`.
Here is an example code that doesn't work with the new compiler
anymore:
```
if (someValue.isNull)
```
Attempting to run the above throws:
```
Error: incompatible types for `(0) : (someValue)`: `int` and
`Nullable!int`
```
I am not sure I understand what kind of `.get` overload are we
supposed to use here. I tried to read the documentation but looks
like it is yet to be updated.
Can somebody please help me out?
More information about the Digitalmars-d-learn
mailing list