> Is there any planned way to inform compiler that a > specific closure can not throw Exception (or return a > value), because it might be executed after the end of > execution of enclosing method? I do not see a clear way to > enforce that rules by the compiler.
Yes, there is a way to do that, and there are a couple of examples in the specification that show how it is done. That's the point of the "throws" generic type parameter.
Flat View: This topic has 19 replies
on 2 pages