On 12/6/17 12:17 PM, Steven Schveighoffer wrote:
So why wouldn't the compiler fail? Because it has no idea yet what you mean by Nullable. It doesn't even know if Nullable will be available or not. You could even import Nullable, but Nullable!T may be an error.
To give an example of why the compiler waits until instantiation: class C(T) : T { void foo() { doesthisexist(); } } class D { void doesthisexist(); } auto x = new C!D; // OK auto y = new C!Object: // fail -Steve