IR: do not infer array element types for non-annotation constants
While annotations restrict the set of allowed types to a few final built-ins, in arbitrary constants we can have array elements that are some subtype of the array's element type. #KT-48671 Fixed
This commit is contained in:
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -323,6 +323,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constantArrayOfAny.kt")
|
||||
public void testConstantArrayOfAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/constantArrayOfAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forEachBooleanArray.kt")
|
||||
public void testForEachBooleanArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
||||
|
||||
Generated
+5
@@ -323,6 +323,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constantArrayOfAny.kt")
|
||||
public void testConstantArrayOfAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/constantArrayOfAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forEachBooleanArray.kt")
|
||||
public void testForEachBooleanArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
||||
|
||||
Generated
+5
@@ -303,6 +303,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constantArrayOfAny.kt")
|
||||
public void testConstantArrayOfAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/constantArrayOfAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forEachBooleanArray.kt")
|
||||
public void testForEachBooleanArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
||||
|
||||
+5
@@ -85,6 +85,11 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri
|
||||
runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constantArrayOfAny.kt")
|
||||
public void testConstantArrayOfAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/constantArrayOfAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forEachBooleanArray.kt")
|
||||
public void testForEachBooleanArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -293,6 +293,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constantArrayOfAny.kt")
|
||||
public void testConstantArrayOfAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/constantArrayOfAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forEachBooleanArray.kt")
|
||||
public void testForEachBooleanArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
||||
|
||||
Reference in New Issue
Block a user