Don't fix a type variable into the intersection type if there is an explicit expected type

^KT-43303 Fixed
^KT-42396 Fixed
^KT-42472 Fixed
This commit is contained in:
Victor Petukhov
2021-03-03 16:02:10 +03:00
parent e06bacafad
commit 7f7bb70596
18 changed files with 220 additions and 6 deletions
@@ -28731,6 +28731,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/typeParameters/deprecatedSyntax.kt");
}
@Test
@TestMetadata("dontIntersectUpperBoundWithExpectedType.kt")
public void testDontIntersectUpperBoundWithExpectedType() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/dontIntersectUpperBoundWithExpectedType.kt");
}
@Test
@TestMetadata("extFunctionTypeAsUpperBound.kt")
public void testExtFunctionTypeAsUpperBound() throws Exception {
@@ -28767,6 +28773,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/typeParameters/implicitNothingOnDelegates.kt");
}
@Test
@TestMetadata("kt42396.kt")
public void testKt42396() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/kt42396.kt");
}
@Test
@TestMetadata("kt42472.kt")
public void testKt42472() throws Exception {
runTest("compiler/testData/diagnostics/tests/typeParameters/kt42472.kt");
}
@Test
@TestMetadata("misplacedConstraints.kt")
public void testMisplacedConstraints() throws Exception {