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:
Anna Kozlova
2015-11-23 16:55:24 +01:00
parent 24bfcbcd27
commit 138bd5a034
8 changed files with 24 additions and 21 deletions

View File

@@ -32,6 +32,6 @@ class ReturnTypeCompatibility {
call((String i)->{ return i;});
call(i->{ return i;});
call(i->"");
call((int i)->{ return <error descr="Bad return type in lambda expression: int cannot be converted to P">i</error>;});
call(<error descr="no instance(s) of type variable(s) exist so that Integer conforms to int">(int i)->{ return i;}</error>);
}
}