lambda: check assignment for proper types (IDEA-137564)

This commit is contained in:
Anna Kozlova
2015-03-12 19:14:19 +01:00
parent 9318783a78
commit 027943681f
3 changed files with 21 additions and 2 deletions
@@ -0,0 +1,15 @@
abstract class Main {
public interface LifetimeFunction<ELF extends Throwable> {
int execute() throws ELF;
}
public final <E extends Throwable> void foo(final LifetimeFunction<E> action) throws E {
runSync(() -> {
action.execute();
return 42;
});
}
abstract < E1 extends Throwable> void runSync(LifetimeFunction<E1> action) throws E1;
}