[NI] Approximate captured types before type variable fixation.

We prefer denotable types when we solve constraint system.
I.e. if for T we have not equality constraint with captured type we can approximate captured type to denotable type.
This commit is contained in:
Stanislav Erokhin
2017-04-06 22:27:58 +03:00
parent b4bf534d29
commit 0fadf0bf70
6 changed files with 73 additions and 13 deletions
@@ -10212,6 +10212,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/capturedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("approximateBeforeFixation.kt")
public void testApproximateBeforeFixation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/approximateBeforeFixation.kt");
doTest(fileName);
}
@TestMetadata("cannotCaptureInProjection.kt")
public void testCannotCaptureInProjection() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt");