Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RawQualifier.java
anna 5f1db87624 new inference: avoid one type parameter inference
(cherry picked from commit f764e69e3f7e98e0c94e701706121069f2775586)
2013-11-25 16:48:09 +01:00

45 lines
696 B
Java

class MyTest {
static class Foo<T> {
T m() {
return null;
}
}
interface I {
Integer m(Foo<Integer> f);
}
public static void main(String[] args) {
I i = Foo::m;
}
}
class MyTest1 {
interface I1 {
void m(String s);
}
interface I2 {
void m(Integer i);
}
interface I3 {
void m(Object o);
}
static class Foo<T extends Number> {
Foo(T t) {}
}
static void foo(I1 i) {}
static void foo(I2 i) {}
static void foo(I3 i) {}
static {
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(Foo::new)</error>;
}
}