new inference: don't push resolved vars in case of failed substitution

This commit is contained in:
Anna Kozlova
2015-11-23 17:31:43 +01:00
parent 138bd5a034
commit 49dfdded70
25 changed files with 240 additions and 240 deletions

View File

@@ -13,7 +13,7 @@ class Foo<R> {
public void foo() {
reduce(Moo::new);
<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<error descr="'reduce(Foo.Factory<S>)' in 'Foo' cannot be applied to '(<method reference>)'">(AMoo::new)</error>;
reduce(AAMoo::new);
reduce(AAAMoo::new);
}

View File

@@ -21,7 +21,7 @@ class MyTestDefaultConstructor {
private static void <warning descr="Private method 'foo(MyTestDefaultConstructor.I3)' is never used">foo</warning>(I3 i) {System.out.println(i);}
static {
foo<error descr="Ambiguous method call: both 'MyTestDefaultConstructor.foo(I1)' and 'MyTestDefaultConstructor.foo(I2)' match">(Foo::new)</error>;
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(Foo::new)</error>;
}
}
@@ -49,7 +49,7 @@ class MyTestConstructor {
private static void <warning descr="Private method 'foo(MyTestConstructor.I3)' is never used">foo</warning>(I3 i) {System.out.println(i);}
static {
foo<error descr="Ambiguous method call: both 'MyTestConstructor.foo(I1)' and 'MyTestConstructor.foo(I2)' match">(Foo::new)</error>;
foo<error descr="Cannot resolve method 'foo(<method reference>)'">(Foo::new)</error>;
}
}