Re: How to check if value is null, today?

2021-10-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/15/21 6:39 AM, tastyminerals wrote: On Thursday, 14 October 2021 at 12:43:36 UTC, jfondren wrote: Do you have a complete example? Because this runs without error: Steven Schveighoffer was correct, the error was caused by non explicit `someVar;` which had to be changed to

Re: How to check if value is null, today?

2021-10-15 Thread tastyminerals via Digitalmars-d-learn
On Thursday, 14 October 2021 at 12:43:36 UTC, jfondren wrote: On Thursday, 14 October 2021 at 11:58:29 UTC, tastyminerals wrote: 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

Re: How to check if value is null, today?

2021-10-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/14/21 7:58 AM, tastyminerals wrote: 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: ```

Re: How to check if value is null, today?

2021-10-14 Thread jfondren via Digitalmars-d-learn
On Thursday, 14 October 2021 at 11:58:29 UTC, tastyminerals wrote: 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` ```