new inference: start inference from top to bottom; ensure getTargetType doesn't perform any inference; cache intermediate results

This commit is contained in:
Anna Kozlova
2015-11-19 10:47:21 +01:00
parent be5f4165ab
commit d32e6ec080
14 changed files with 484 additions and 156 deletions
@@ -32,7 +32,7 @@ class Test1 {
}
{
bar(l -> baz<error descr="'baz(java.lang.Object)' in 'Test1' cannot be applied to '(<lambda parameter>)'">(l)</error>);
bar(l -> <error descr="Unhandled exception: Test1.MyEx">baz(l)</error>);
bar(<error descr="Unhandled exception: Test1.MyEx">this::baz</error>);
}
}
@@ -28,7 +28,7 @@ abstract class NoFormalParamTypeInferenceNeeded {
zip(a -> zip(text -> text));
Integer zip = zip(a -> zip(<error descr="inference variable R has incompatible bounds:
lower bounds: Object
upper bounds: Object, R">text -> text</error>));
upper bounds: Object, R, Integer">text -> text</error>));
}
}
@@ -6,7 +6,7 @@ public class Bug
{
final I<CRN> f = null;
Bug.<String>create(fn<error descr="'fn(Bug.I<FN>)' in 'Bug' cannot be applied to '(Bug.I<CRN>)'">(f)</error>);
Bug.<String>create<error descr="'create(Bug.I<java.lang.String>)' in 'Bug' cannot be applied to '(Bug.I<CRN>)'">(fn(f))</error>;
return create(fn(f));