-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 9, 10, 11
-
Component/s: tools
When compiling this program:
package issue;
public class A {
public static interface I {
public void m(String s);
}
public void add (I i) {}
public static void main(String[] args) {
A a = new A();
a.add(() -> {});
}
}
A spurious diagnostic is generated (with the wrong line info):
error: incompatible types: incompatible parameter types in lambda expression
class A {
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
package issue;
public class A {
public static interface I {
public void m(String s);
}
public void add (I i) {}
public static void main(String[] args) {
A a = new A();
a.add(() -> {});
}
}
A spurious diagnostic is generated (with the wrong line info):
error: incompatible types: incompatible parameter types in lambda expression
class A {
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error