Fixed exception from EA

"The constraint shouldn't contain different type variables on both sides: T <: R".
It occurred because we analyzed function literals before completion with unsubstituted (therefore wrong) expected type, and cached resulting type.
This commit is contained in:
svtk
2013-11-19 22:02:40 +04:00
parent efd5f69330
commit ca1650d31d
4 changed files with 17 additions and 40 deletions
@@ -3312,6 +3312,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/inference/constraints"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("constraintOnFunctionLiteral.kt")
public void testConstraintOnFunctionLiteral() throws Exception {
doTest("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt");
}
@TestMetadata("equalityConstraintOnNullableType.kt")
public void testEqualityConstraintOnNullableType() throws Exception {
doTest("compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt");