mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
[java-highlighting] IDEA-344501 (part of) IntelliJ Wrong Error Highlighting with Wildcard Method Reference
Do not report 'unexpected wildcard' if the method reference is not in the constructor form (see JLS 15.13) GitOrigin-RevId: 19d0acbe97b2a4d6ae3f5c611ff6a24490eec09c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1ff463da3d
commit
8034f97303
@@ -2,6 +2,10 @@ class Test {
|
||||
interface IFactory {
|
||||
Object m();
|
||||
}
|
||||
|
||||
interface FooToInt {
|
||||
int m(Foo<?> foo);
|
||||
}
|
||||
|
||||
@interface Anno {}
|
||||
|
||||
@@ -29,6 +33,8 @@ class Test {
|
||||
IFactory c5 = <error descr="Cannot find class 1">1</error>::new;
|
||||
IFactory c6 = <error descr="'ABar' is abstract; cannot be instantiated">ABar::new</error>;
|
||||
IFactory c7 = <error descr="'ABaz' is abstract; cannot be instantiated">ABaz::new</error>;
|
||||
|
||||
FooToInt fooToInt = Foo<?>::hashCode;
|
||||
|
||||
foo(<error descr="'Anno' is abstract; cannot be instantiated">Anno::new</error>);
|
||||
foo(<error descr="Enum types cannot be instantiated">E::new</error>);
|
||||
|
||||
Reference in New Issue
Block a user