Community
Participate
Working Groups
If closures are used in the context of a functional type (i.e. some type with one method in addition to all public Object members) we should use that as the closures type. This should avoid unnecessary conversions in the compiler and also allows for being able throw checked exceptions as long as they are declared as thrown by the functional type's method. We could have a utility function to wrap and re-throw checked exceptions, which allows us to write code like this: val x = unchecked[ someCodeThrowingCheckedExceptions() ] Unchecked would internally rethrow any checked exception as a runtime exception. That could be a convenient compromise if you have to deal with APIs (over)using checked exceptions.
Resolved.
Requested via bug 522520. -M.