inference: don't check bounds for variables which may depend on another variable with inconsistency bounds

This commit is contained in:
Anna Kozlova
2016-03-03 13:31:40 +01:00
parent d8c289c77e
commit 6c5fc69ae9
3 changed files with 6 additions and 9 deletions
@@ -12,10 +12,7 @@ class Test {
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
inference variable X has incompatible bounds:
equality constraints: R
upper bounds: Number">() -> new Foo<>()</error>);
upper bounds: Object, Number">() -> new Foo<>()</error>);
SuperFoo<Integer> li = foo(() -> new Foo<>());
SuperFoo<?> lw = foo(() -> new Foo<>());
}
@@ -29,10 +29,7 @@ abstract class NoFormalParamTypeInferenceNeeded {
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, Integer
inference variable R has incompatible bounds:
lower bounds: Object
upper bounds: Object, R, Integer">text -> text</error>));
upper bounds: Object, Integer">text -> text</error>));
}
}