author | ysuenaga |
Wed, 30 Mar 2016 21:05:13 +0900 | |
changeset 37218 | c7241bc368bf |
parent 22685 | c8d0807378b6 |
permissions | -rw-r--r-- |
22685
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
1 |
/* |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
3 |
* @bug 8030816 |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
4 |
* @summary javac can't compile program with lambda expression |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
5 |
* @compile/fail/ref=CrashLambdaExpressionWithNonAccessibleIdTest.out -XDrawDiagnostics CrashLambdaExpressionWithNonAccessibleIdTest.java |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
6 |
*/ |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
7 |
|
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
8 |
/* This test must make sure that javac won't crash when compiling lambda |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
9 |
* containing an anonymous innerclass based on an unresolvable type. |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
10 |
*/ |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
11 |
public class CrashLambdaExpressionWithNonAccessibleIdTest { |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
12 |
void m() { |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
13 |
m1(()-> { |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
14 |
new A(){ |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
15 |
public void m11() {} |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
16 |
}; |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
17 |
}); |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
18 |
|
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
19 |
} |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
20 |
|
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
21 |
void m1(Runnable r) {} |
c8d0807378b6
8030816: javac crashes when mixing lambdas and inner classes
vromero
parents:
diff
changeset
|
22 |
} |