I made several tests with NotNull yesterday and actually they all passed. In special cases i didn't get a compiler error but then a runtime error is better then nothing. :)

But there is still my problem with this:

void foo(NotNull!(Foo) n) {

}

void bar(Foo n) {

}

in my optinion it must exist a way that both
NotNull!(Foo) nf = new Foo();

foo(nf);
bar(nf);

and furhtermore
Foo f = new Foo();

foo(f);
bar(f);

compiles.
We need some hack, implicit cast or compiler cast that cast or passes Foo to NotNull!(Foo).

Any suggestions?

Reply via email to