-
Enhancement
-
Resolution: Unresolved
-
P4
-
8, 9
An instance method and a static method that take the current class as first parameter can be ambiguous when trying to create a method reference.
Here is an example given by Brian on the core-dev mailing list:
class Foo {
void m(int x)
static void m(Foo f, int x)
}
here, Foo::m is ambiguous.
see http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-May/033415.html
javac should emit a warning in this case to help API designer to avoid such issue.
Here is an example given by Brian on the core-dev mailing list:
class Foo {
void m(int x)
static void m(Foo f, int x)
}
here, Foo::m is ambiguous.
see http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-May/033415.html
javac should emit a warning in this case to help API designer to avoid such issue.