jdk-24/langtools/test/tools/javac/lambda/LambdaConv28.java
Jan Lahoda dfaf30bc4c 8181911: Lambda Analyzer causes compile-time error
When copying Env<AttrContext> for Analyzer, detach returnResult from the outer context.

Reviewed-by: mcimadamore
2017-06-19 11:41:21 +02:00

33 lines
628 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8181911
* @summary Verify that the analyzer does not affect ordinary compilation.
* @compile/ref=LambdaConv28.out -XDrawDiagnostics -XDfind=lambda LambdaConv28.java
*/
class LambdaConv28 {
public void test(A a) {
test(()-> {
return new I() {
public <T> void t() {
}
};
});
test(new A() {
public I get() {
return null;
}
});
}
public interface I {
public <T> void t();
}
public interface A {
public I get();
}
}