FIR: improve inference of implicit type arguments in casts

Type parameters do not necessarily match one-to-one, or preserve order.
This commit is contained in:
pyos
2021-01-06 14:39:22 +01:00
committed by Dmitriy Novozhilov
parent acdc1f532b
commit 29f95c7df2
32 changed files with 134 additions and 149 deletions
@@ -26438,6 +26438,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt");
}
@TestMetadata("inferredTypeParameters.kt")
public void testInferredTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/when/inferredTypeParameters.kt");
}
@TestMetadata("integralWhenWithNoInlinedConstants.kt")
public void testIntegralWhenWithNoInlinedConstants() throws Exception {
runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt");
@@ -26438,6 +26438,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt");
}
@TestMetadata("inferredTypeParameters.kt")
public void testInferredTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/when/inferredTypeParameters.kt");
}
@TestMetadata("integralWhenWithNoInlinedConstants.kt")
public void testIntegralWhenWithNoInlinedConstants() throws Exception {
runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt");
@@ -26403,6 +26403,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt");
}
@TestMetadata("inferredTypeParameters.kt")
public void testInferredTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/when/inferredTypeParameters.kt");
}
@TestMetadata("integralWhenWithNoInlinedConstants.kt")
public void testIntegralWhenWithNoInlinedConstants() throws Exception {
runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt");
@@ -14599,6 +14599,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt");
}
@TestMetadata("inferredTypeParameters.kt")
public void testInferredTypeParameters() throws Exception {
runTest("compiler/testData/codegen/box/when/inferredTypeParameters.kt");
}
@TestMetadata("kt2457.kt")
public void testKt2457() throws Exception {
runTest("compiler/testData/codegen/box/when/kt2457.kt");