diamonds: no diamonds with anonymous classes (IDEA-72391)

This commit is contained in:
anna
2011-07-26 10:02:17 +04:00
parent d2a310902b
commit afcf43129a
6 changed files with 9 additions and 35 deletions
@@ -1,16 +0,0 @@
// "Replace with <>" "true"
class Test {
void test() {
class Foo<X extends Number> {
Foo() {}
Foo(X x) {}
}
Foo<Number> f1 = new Foo<Number>(1);
Foo<?> f2 = new Foo<Number>();
Foo<?> f3 = new Foo<Integer>();
Foo<Number> f4 = new Foo<Number>(1) {};
Foo<?> f5 = new Foo<>() {};
Foo<?> f6 = new Foo<Integer>() {};
}
}
@@ -1,16 +0,0 @@
// "Replace with <>" "true"
class Test {
void test() {
class Foo<X extends Number> {
Foo() {}
Foo(X x) {}
}
Foo<Number> f1 = new Foo<Number>(1);
Foo<?> f2 = new Foo<Number>();
Foo<?> f3 = new Foo<Integer>();
Foo<Number> f4 = new Foo<Number>(1) {};
Foo<?> f5 = new Foo<Number>() {};
Foo<?> f6 = new Foo<>() {};
}
}
@@ -1,4 +1,4 @@
// "Replace with <>" "true"
// "Replace with <>" "false"
class Test {
void test() {
@@ -1,4 +1,4 @@
// "Replace with <>" "true"
// "Replace with <>" "false"
class Test {
void test() {
@@ -0,0 +1,6 @@
// "Replace with <>" "false"
class Test<T> {
Test<String> s = new Test<St<caret>ring>(){
}; // anonymous inner class
}