3789983e89
Reviewed-by: darcy, ihse
27 lines
714 B
Java
27 lines
714 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 8053906
|
|
* @summary javac, some lambda programs are rejected by flow analysis
|
|
* @compile/fail/ref=SelfInitializerInLambdaTestc.out -XDrawDiagnostics SelfInitializerInLambdaTestc.java
|
|
*/
|
|
|
|
public class SelfInitializerInLambdaTestc {
|
|
interface SAM {
|
|
void foo();
|
|
}
|
|
|
|
final SAM notInitialized = ()-> {
|
|
SAM simpleVariable = () -> notInitialized.foo();
|
|
};
|
|
|
|
final SAM notInitialized2 = ()-> {
|
|
SAM simpleVariable1 = () -> {
|
|
SAM simpleVariable2 = () -> {
|
|
SAM simpleVariable3 = () -> {
|
|
SAM simpleVariable4 = () -> notInitialized2.foo();
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|