mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
constructor refs: decline abstract classes (IDEA-102392)
This commit is contained in:
@@ -11,6 +11,14 @@ class Test {
|
||||
|
||||
static class Foo<X> { }
|
||||
|
||||
static abstract class ABar {
|
||||
protected ABar() {
|
||||
}
|
||||
}
|
||||
|
||||
static abstract class ABaz {
|
||||
}
|
||||
|
||||
void foo(IFactory cf) { }
|
||||
|
||||
void testAssign() {
|
||||
@@ -19,11 +27,15 @@ class Test {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c3 = I::new;</error>
|
||||
IFactory c4 = Foo<?>::new;
|
||||
IFactory c5 = <error descr="Cannot find class 1">1</error>::new;
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c6 = ABar::new;</error>
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c7 = ABaz::new;</error>
|
||||
|
||||
foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(Anno::new)</error>;
|
||||
foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(E::new)</error>;
|
||||
foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(I::new)</error>;
|
||||
foo(Foo<?>::new);
|
||||
foo(<error descr="Cannot find class 1">1</error>::new);
|
||||
foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(ABar::new)</error>;
|
||||
foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(ABaz::new)</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user