mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
new inference: provide diagnostics on failed inference (strict subtyping constraints); don't resolve vars before incorporate - this way captures won't be opened too early
This commit is contained in:
@@ -9,7 +9,8 @@ class Test {
|
||||
|
||||
<R> SuperFoo<R> foo(I<R> ax) { return null; }
|
||||
|
||||
SuperFoo<String> ls = foo(<error descr="inference variable R has incompatible bounds:
|
||||
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<Integer> li = foo(() -> new Foo<>());
|
||||
|
||||
@@ -26,7 +26,8 @@ abstract class NoFormalParamTypeInferenceNeeded {
|
||||
{
|
||||
map(a -> zip(text -> text));
|
||||
zip(a -> zip(text -> text));
|
||||
Integer zip = zip(a -> zip(<error descr="inference variable R has incompatible bounds:
|
||||
Integer zip = zip(a -> zip(<error descr="no instance(s) of type variable(s) exist so that Object conforms to Integer
|
||||
inference variable R has incompatible bounds:
|
||||
lower bounds: Object
|
||||
upper bounds: Object, R, Integer">text -> text</error>));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user