Closed
Description
[EDIT] The resolution of this is that we're not taking this approach now. We could reconsider in the future if we have demand for it. A workup of the equational theory was done here.
This issue is for discussion of the question of whether we should add a type operator which strips off the nullability from a type. That is, if T
is a type, then T!
would be the non-nullable version of T
.
class C<T> {
T! foo(T x) {
if (x == null) throw "Badness";
return x;
}
}
void test() {
int x = new C<int?>().foo(3);
int x = new C<int>().foo(3);
}