fix expected thrown types for lambda expressions

This commit is contained in:
Bas Leijdekkers
2014-12-03 13:29:39 +01:00
parent d12fceb113
commit f972926905
3 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
// "Create Local Variable 'v'" "true"
public class A {
void foo() {
L l = () -> {
MyException v;
throw v
}
}
interface L {
void g() throws MyException;
}
class MyException extends Exception {}
}

View File

@@ -0,0 +1,13 @@
// "Create Local Variable 'v'" "true"
public class A {
void foo() {
L l = () -> {
throw v<caret>
}
}
interface L {
void g() throws MyException;
}
class MyException extends Exception {}
}