method refs: default constructors check (IDEA-92777)

This commit is contained in:
anna
2012-10-11 13:34:27 +02:00
parent 79354743ae
commit 56036f1542
2 changed files with 34 additions and 24 deletions

View File

@@ -86,3 +86,20 @@ class DefaultConstructor4 {
StaticInner foo(DefaultConstructor4 receiver);
}
}
class DefaultConstructor5 {
public class Inner {}
static void test() {
<error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor5.I'">I i = Inner::new;</error>
}
void test1() {
I i = Inner::new;
}
interface I {
DefaultConstructor5.Inner foo();
}
}