mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
method refs: correct static flag detection in case of default constructors (IDEA-92735)
This commit is contained in:
@@ -56,3 +56,33 @@ class DefaultConstructor2 {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor2.I'">I i2 = this::new;</error>
|
||||
}
|
||||
}
|
||||
|
||||
class DefaultConstructor3 {
|
||||
public class Inner {}
|
||||
public static class StaticInner {}
|
||||
|
||||
static <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor3.I'">I i = Inner::new;</error>
|
||||
static I1 i1 = StaticInner::new;
|
||||
interface I {
|
||||
Inner foo();
|
||||
}
|
||||
|
||||
interface I1 {
|
||||
StaticInner foo();
|
||||
}
|
||||
}
|
||||
|
||||
class DefaultConstructor4 {
|
||||
public class Inner {}
|
||||
public static class StaticInner {}
|
||||
|
||||
static I i = Inner::new;
|
||||
static <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor4.I1'">I1 i1 = StaticInner::new;</error>
|
||||
interface I {
|
||||
Inner foo(DefaultConstructor4 receiver);
|
||||
}
|
||||
|
||||
interface I1 {
|
||||
StaticInner foo(DefaultConstructor4 receiver);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user