inference: register inference error when nested inference don't start as cached session already had errors

This commit is contained in:
Anna.Kozlova
2016-10-21 18:07:07 +02:00
parent 3797d3ea1c
commit 9bcbdb68cb
9 changed files with 15 additions and 20 deletions
@@ -32,7 +32,7 @@ class Test1 {
}
{
bar(l -> <error descr="Unhandled exception: Test1.MyEx">baz(l)</error>);
bar(l -> baz<error descr="'baz(T)' in 'Test1' cannot be applied to '(java.lang.Object)'">(l)</error>);
bar(<error descr="Unhandled exception: Test1.MyEx">this::baz</error>);
}
}
@@ -26,6 +26,6 @@ class Test {
.map(object -> Arrays.stream(functions)
.map(fn -> fn.apply(object))
.collect(toList()))
.collect<error descr="'collect(java.util.stream.Collector<? super java.util.List<capture<?>>,A,R>)' in 'java.util.stream.Stream' cannot be applied to '(java.util.stream.Collector<T,capture<?>,java.util.List<T>>)'">(toList())</error>;
.collect(toList<error descr="'toList()' in 'java.util.stream.Collectors' cannot be applied to '()'">()</error>);
}
}
@@ -9,10 +9,7 @@ class Test {
<R> SuperFoo<R> foo(I<R> ax) { return null; }
SuperFoo<String> ls = foo(<error descr="no instance(s) of type variable(s) exist so that String conforms to Number
inference variable R has incompatible bounds:
equality constraints: String
upper bounds: Object, Number">() -> new Foo<>()</error>);
SuperFoo<String> ls = foo(() -> new Foo<error descr="Cannot infer arguments"><></error>());
SuperFoo<Integer> li = foo(() -> new Foo<>());
SuperFoo<?> lw = foo(() -> new Foo<>());
}