Use captured type approximation from new inference in ExpressionCodegen
This is needed in order to avoid star projections being expanded into `out Any?`, which is visible for users of `typeOf` since 1.4. #KT-30278 Fixed
This commit is contained in:
Generated
+10
-5
@@ -19702,11 +19702,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classes.kt")
|
||||
public void testClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/classes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClasses.kt")
|
||||
public void testInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/inlineClasses.kt");
|
||||
@@ -19722,6 +19717,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeOfCapturedStar.kt")
|
||||
public void testTypeOfCapturedStar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/reflection/typeOf/js")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -19764,6 +19764,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/js/multipleModules.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeOfCapturedStar.kt")
|
||||
public void testTypeOfCapturedStar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeOfReifiedUnit.kt")
|
||||
public void testTypeOfReifiedUnit() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt");
|
||||
|
||||
+10
-5
@@ -19762,11 +19762,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classes.kt")
|
||||
public void testClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/classes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClasses.kt")
|
||||
public void testInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/inlineClasses.kt");
|
||||
@@ -19782,6 +19777,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeOfCapturedStar.kt")
|
||||
public void testTypeOfCapturedStar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/reflection/typeOf/js")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -19824,6 +19824,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/js/multipleModules.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeOfCapturedStar.kt")
|
||||
public void testTypeOfCapturedStar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeOfReifiedUnit.kt")
|
||||
public void testTypeOfReifiedUnit() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt");
|
||||
|
||||
Reference in New Issue
Block a user