Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b59
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085473 | emb-9 | Vicente Arturo Romero Zaldivar | P4 | Resolved | Fixed | team |
Description
For a test case like:
import java.util.concurrent.*;
class Test {
class Inner {}
static void m(Callable<Inner> r) {}
static void m1() {
m(Inner::new);
}
}
during the resolution of this method reference an error of kind MISSING_ENCL is generated, the issue is that as this kind is considered as an overload error, then the method reference is considered as overloaded which is incorrect. This provokes misleading error messages.
import java.util.concurrent.*;
class Test {
class Inner {}
static void m(Callable<Inner> r) {}
static void m1() {
m(Inner::new);
}
}
during the resolution of this method reference an error of kind MISSING_ENCL is generated, the issue is that as this kind is considered as an overload error, then the method reference is considered as overloaded which is incorrect. This provokes misleading error messages.
Attachments
Issue Links
- backported by
-
JDK-8085473 javac is mistakenly considering a missing enclosing instance error as an overload error
-
- Resolved
-
- relates to
-
JDK-8075541 javac should make a correct separation between target and non-target resolution errors
-
- Open
-