mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
switch tests on new inference
(cherry picked from commit d2cbf3f2833104c3a0381059b0d6ef8ac0b3c94c)
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ class Foo<R> {
|
||||
|
||||
public void foo() {
|
||||
reduce(Moo::new);
|
||||
reduce<error descr="'reduce(Foo.Factory<Foo.ASink>)' in 'Foo' cannot be applied to '(<method reference>)'">(AMoo::new)</error>;
|
||||
<error descr="Inferred type 'Foo<R>.AMoo' for type parameter 'S' is not within its bound; should implement 'Foo.ASink<java.lang.Object,Foo<R>.AMoo>'">reduce(AMoo::new)</error>;
|
||||
reduce(AAMoo::new);
|
||||
reduce(AAAMoo::new);
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ class MyTest<E> {
|
||||
bar(MyTest<String>::new, "");
|
||||
bar(MyTest::new, "");
|
||||
|
||||
bar(<error descr="Cyclic inference">MyTest::new</error>);
|
||||
bar(<error descr="Cyclic inference">MyTest<String>::new</error>);
|
||||
bar(MyTest::new);
|
||||
bar(MyTest<String>::new);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ class Test {
|
||||
|
||||
static void test() {
|
||||
Integer next = map(String::length).iterator().next();
|
||||
Integer next1 = map(Test::length).iterator().next();
|
||||
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'java.lang.Integer'">Integer next1 = map(Test::length).iterator().next();</error>
|
||||
}
|
||||
|
||||
public static <T> T length(T s) {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class MyTest {
|
||||
static void foo(I3 i) {}
|
||||
|
||||
static {
|
||||
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(MyTest::m)</error>;
|
||||
foo<error descr="Ambiguous method call: both 'MyTest.foo(I1)' and 'MyTest.foo(I2)' match">(MyTest::m)</error>;
|
||||
foo<error descr="Ambiguous method call: both 'MyTest.foo(I1)' and 'MyTest.foo(I2)' match">(MyTest::m1)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,6 +39,6 @@ class MyTest1 {
|
||||
static void foo(I3 i) {}
|
||||
|
||||
static {
|
||||
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(Foo::new)</error>;
|
||||
foo<error descr="Ambiguous method call: both 'MyTest1.foo(I1)' and 'MyTest1.foo(I2)' match">(Foo::new)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user