Capture flexible intersection types properly: take into account both bounds and use the same captured arguments for them

^KT-41693 Fixed
This commit is contained in:
Victor Petukhov
2020-09-07 17:48:30 +03:00
parent 140edb2215
commit c1ebd33833
9 changed files with 103 additions and 8 deletions
@@ -10862,6 +10862,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@TestMetadata("subtypingOfIntersectionIltInsideFlexible.kt")
public void testSubtypingOfIntersectionIltInsideFlexible() throws Exception {
runTest("compiler/testData/codegen/box/inference/subtypingOfIntersectionIltInsideFlexible.kt");
}
@TestMetadata("unsafeVarianceCodegen.kt")
public void testUnsafeVarianceCodegen() throws Exception {
runTest("compiler/testData/codegen/box/inference/unsafeVarianceCodegen.kt");
@@ -10862,6 +10862,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@TestMetadata("subtypingOfIntersectionIltInsideFlexible.kt")
public void testSubtypingOfIntersectionIltInsideFlexible() throws Exception {
runTest("compiler/testData/codegen/box/inference/subtypingOfIntersectionIltInsideFlexible.kt");
}
@TestMetadata("unsafeVarianceCodegen.kt")
public void testUnsafeVarianceCodegen() throws Exception {
runTest("compiler/testData/codegen/box/inference/unsafeVarianceCodegen.kt");
@@ -10927,6 +10927,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inference/referenceToCatchParameterFromLambdaExpression.kt");
}
@TestMetadata("subtypingOfIntersectionIltInsideFlexible.kt")
public void testSubtypingOfIntersectionIltInsideFlexible() throws Exception {
runTest("compiler/testData/codegen/box/inference/subtypingOfIntersectionIltInsideFlexible.kt");
}
@TestMetadata("unsafeVarianceCodegen.kt")
public void testUnsafeVarianceCodegen() throws Exception {
runTest("compiler/testData/codegen/box/inference/unsafeVarianceCodegen.kt");