mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
complex inference algorithm for diamond
This commit is contained in:
-7
@@ -1,7 +0,0 @@
|
||||
// "Replace with <>" "true"
|
||||
public class Test {
|
||||
F<F<String>> f = new FF<>();
|
||||
}
|
||||
|
||||
class FF<X> extends F<X>{}
|
||||
class F<T> {}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
// "Replace with <>" "true"
|
||||
public class Test {
|
||||
void bar() {
|
||||
foo(new FF<>());
|
||||
}
|
||||
|
||||
void foo(F<F<String>> p) {}
|
||||
}
|
||||
|
||||
class FF<X> extends F<X>{}
|
||||
class F<T> {}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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<>();
|
||||
Foo<?> f3 = new Foo<Integer>();
|
||||
Foo<Number> f4 = new Foo<Number>(1) {};
|
||||
Foo<?> f5 = new Foo<Number>() {};
|
||||
Foo<?> f6 = new Foo<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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<>();
|
||||
Foo<Number> f4 = new Foo<Number>(1) {};
|
||||
Foo<?> f5 = new Foo<Number>() {};
|
||||
Foo<?> f6 = new Foo<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace with <>" "true"
|
||||
// "Replace with <>" "false"
|
||||
public class Test {
|
||||
F<F<String>> f = new FF<Str<caret>ing>();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace with <>" "true"
|
||||
// "Replace with <>" "false"
|
||||
public class Test {
|
||||
void bar() {
|
||||
foo(new FF<Str<caret>ing>());
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace with <>" "false"
|
||||
class Test {
|
||||
|
||||
void test() {
|
||||
class Foo<X extends Number> {
|
||||
Foo() {}
|
||||
Foo(X x) {}
|
||||
}
|
||||
Foo<Number> f1 = new Foo<Nu<caret>mber>(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<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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<Num<caret>ber>();
|
||||
Foo<?> f3 = new Foo<Integer>();
|
||||
Foo<Number> f4 = new Foo<Number>(1) {};
|
||||
Foo<?> f5 = new Foo<Number>() {};
|
||||
Foo<?> f6 = new Foo<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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<Inte<caret>ger>();
|
||||
Foo<Number> f4 = new Foo<Number>(1) {};
|
||||
Foo<?> f5 = new Foo<Number>() {};
|
||||
Foo<?> f6 = new Foo<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace with <>" "false"
|
||||
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<Nu<caret>mber>(1) {};
|
||||
Foo<?> f5 = new Foo<Number>() {};
|
||||
Foo<?> f6 = new Foo<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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<Numb<caret>er>() {};
|
||||
Foo<?> f6 = new Foo<Integer>() {};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "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<In<caret>teger>() {};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user