5 ms·
Will the compiler infer that a lambda or a method ref implements Func with its exception type param, or do you have to rewrite call sites?
by erik_seaberg 2y ago
Will the compiler infer that a lambda or a method ref implements Func with its exception type param, or do you have to rewrite call sites?
- layer8 2y agoThe compiler already infers that in current Java for one checked exception type, and also for several exception types at least in some cases (the latter seems to be a little more buggy in the current implementation).