new inference: init inter call inference

This commit is contained in:
Anna Kozlova
2013-09-20 20:36:35 +04:00
parent 06829c5376
commit 4a46b24bcb
6 changed files with 65 additions and 25 deletions
@@ -8,6 +8,6 @@ public class Test<Y> {
}
public static void main(String[] args) {
Test.<Set<String>>doTest<error descr="'doTest(java.util.Set<java.lang.String>)' in 'Test' cannot be applied to '(java.util.Set<java.lang.Object>)'">(Collections.emptySet())</error>;
Test.<Set<String>>doTest(Collections.emptySet());
}
}
@@ -8,7 +8,7 @@ public class NestedGenericGoodCodeIsRed {
Number num = null;
satisfiesAllOf(isPositive(), isEqualTo(num));
this.<Number>satisfiesAllOf<error descr="'satisfiesAllOf(NestedGenericGoodCodeIsRed.Predicate<? super java.lang.Number>, NestedGenericGoodCodeIsRed.Predicate<? super java.lang.Number>)' in 'NestedGenericGoodCodeIsRed' cannot be applied to '(NestedGenericGoodCodeIsRed.Predicate<java.lang.Number>, NestedGenericGoodCodeIsRed.Predicate<java.lang.Integer>)'">(isPositive(), isEqualTo(10))</error>;
this.<Number>satisfiesAllOf(isPositive(), isEqualTo(10));
}