mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
replace with diamonds should always check if inferred type agrees with expected type (IDEA-73944)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'new Foo<Integer>()' to 'new Foo<Number>()'" "true"
|
||||
|
||||
class Foo<T> {
|
||||
Foo(T t) {}
|
||||
Foo() {}
|
||||
}
|
||||
|
||||
class Constructors {
|
||||
public static void main(String[] args) {
|
||||
Foo<Number> foo2 = new Foo<>();
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'new Foo<Integer>(...)' to 'new Foo<Number>()'" "true"
|
||||
|
||||
class Foo<T> {
|
||||
Foo(T t) {}
|
||||
Foo() {}
|
||||
}
|
||||
|
||||
class Constructors {
|
||||
public static void main(String[] args) {
|
||||
Foo<Number> foo2 = new Foo<Number>(1);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'new Foo<Integer>()' to 'new Foo<Number>()'" "true"
|
||||
|
||||
class Foo<T> {
|
||||
Foo(T t) {}
|
||||
Foo() {}
|
||||
}
|
||||
|
||||
class Constructors {
|
||||
public static void main(String[] args) {
|
||||
Foo<Number> foo2 = new Foo<Int<caret>eger>();
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'new Foo<Integer>(...)' to 'new Foo<Number>()'" "true"
|
||||
|
||||
class Foo<T> {
|
||||
Foo(T t) {}
|
||||
Foo() {}
|
||||
}
|
||||
|
||||
class Constructors {
|
||||
public static void main(String[] args) {
|
||||
Foo<Number> foo2 = new Foo<Int<caret>eger>(1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user