mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 15:50:52 +07:00
method refs: when no acceptable methods found force conflicts to be empty; raw refs corrected; check for static should be performed over inner class in case of constructors
This commit is contained in:
@@ -73,4 +73,46 @@ class StaticInner1 {
|
||||
static {
|
||||
call3<error descr="Ambiguous method call: both 'StaticInner1.call3(I1)' and 'StaticInner1.call3(I2)' match">(StaticInner1.Inner :: new)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
class StaticInner2 {
|
||||
|
||||
static class Inner {
|
||||
Inner() {}
|
||||
}
|
||||
|
||||
|
||||
interface I1 {
|
||||
Inner m(StaticInner2 rec);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'StaticInner2.I1'">I1 i1 = StaticInner2.Inner :: new;</error>
|
||||
}
|
||||
|
||||
{
|
||||
<error descr="Incompatible types. Found: '<method reference>', required: 'StaticInner2.I1'">I1 i1 = StaticInner2.Inner :: new;</error>
|
||||
}
|
||||
}
|
||||
|
||||
class NonStaticInner2 {
|
||||
|
||||
class Inner {
|
||||
Inner() {}
|
||||
}
|
||||
|
||||
|
||||
interface I1 {
|
||||
Inner m(NonStaticInner2 rec);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
I1 i1 = NonStaticInner2.Inner :: new;
|
||||
}
|
||||
|
||||
{
|
||||
I1 i1 = NonStaticInner2.Inner :: new;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user