Why does Nullable implicitly casts when assigning a variable but not when returning from a function?

Lettever real at email.com
Wed Apr 10 20:41:56 UTC 2024


```
import std;

Nullable!int func() => 3;
void main() {
     Nullable!int a = 3;
     //works fine
     Nullable!int b = func();
     //does not compile
}


More information about the Digitalmars-d-learn mailing list