mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
new inference: refinement on generics array creation/forbid wildcards in ClassType qualifier
(cherry picked from commit 72a410e804b569893f0bad7739bdd9a7c1c270f1)
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
class Test {
|
||||
interface I {
|
||||
Object foo();
|
||||
}
|
||||
|
||||
static class Foo<X> { }
|
||||
|
||||
{
|
||||
I i1 = <error descr="Unexpected wildcard">Foo<?></error>::new;
|
||||
I i2 = <error descr="Unexpected wildcard">Foo<? extends String></error>::new;
|
||||
I i3 = Foo<String>::new;
|
||||
|
||||
I i4 = <error descr="Generic array creation">Foo<? extends String>[]</error>::new;
|
||||
I i5 = <error descr="Generic array creation">Foo<String>[]</error>::new;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user