mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
method refs: check constructor refs qualifiers (IDEA-92722)
This commit is contained in:
@@ -74,3 +74,31 @@ class MyTest3<X> {
|
||||
test<error descr="'test(MyTest3.I<java.lang.Integer>)' in 'MyTest3' cannot be applied to '(<method reference>)'">(MyTest3<String>::new)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
class MyTestInvalidQ {
|
||||
class Super {}
|
||||
|
||||
class ConstructorRefs extends Super {
|
||||
void test() {
|
||||
ConstructorRefs refs = new ConstructorRefs();
|
||||
BlahBlah b0 = <error descr="Cannot find class refs">refs</error>::new;
|
||||
BlahBlah blahBlah = <error descr="Cannot find class this">this</error>::new;
|
||||
BlahBlah1 blahBlah1 = <error descr="Cannot find class super">super</error>::new;
|
||||
}
|
||||
}
|
||||
|
||||
interface BlahBlah {
|
||||
ConstructorRefs foo();
|
||||
}
|
||||
|
||||
interface BlahBlah1 {
|
||||
Super foo();
|
||||
}
|
||||
|
||||
abstract static class A {
|
||||
interface I {
|
||||
A foo();
|
||||
}
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTestInvalidQ.A.I'">I i = A :: new;</error>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user