mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
method refs: default constructors check (IDEA-92777)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user