mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +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:
@@ -12,7 +12,8 @@ class TypeArgsConsistency {
|
||||
I<Integer> i1 = (i, j) -> i + j;
|
||||
foo((i, j) -> i + j);
|
||||
I<Integer> i2 = bar((i, j) -> i + j);
|
||||
I<Integer> i3 = bar(<error descr="inference variable X has incompatible bounds:
|
||||
I<Integer> i3 = bar(<error descr="no instance(s) of type variable(s) exist so that String conforms to Integer
|
||||
inference variable X has incompatible bounds:
|
||||
equality constraints: Integer
|
||||
lower bounds: String">(i, j) -> "" + i + j</error>);
|
||||
}
|
||||
@@ -45,7 +46,8 @@ class TypeArgsConsistency2 {
|
||||
I<Integer> i1 = bar(x -> x);
|
||||
I1<Integer> i2 = bar1(x -> 1);
|
||||
I2<String> aI2 = bar2(x -> "");
|
||||
I2<Integer> aI28 = bar2( <error descr="inference variable T has incompatible bounds:
|
||||
I2<Integer> aI28 = bar2( <error descr="no instance(s) of type variable(s) exist so that String conforms to Integer
|
||||
inference variable T has incompatible bounds:
|
||||
equality constraints: Integer
|
||||
lower bounds: String">x-> ""</error>);
|
||||
I2<Integer> i3 = bar2(x -> x);
|
||||
|
||||
Reference in New Issue
Block a user