~ arrays in jvmDescriptor()
diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java
index ba56cba..3249706 100644
--- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java
+++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java
@@ -29760,6 +29760,12 @@
}
@Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
+
+ @Test
@TestMetadata("removeIf.kt")
public void testRemoveIf() throws Exception {
runTest("compiler/testData/codegen/box/jdk/removeIf.kt");
diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java
index fd5117b..a28f3bf 100644
--- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java
+++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java
@@ -29760,6 +29760,12 @@
}
@Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
+
+ @Test
@TestMetadata("removeIf.kt")
public void testRemoveIf() throws Exception {
runTest("compiler/testData/codegen/box/jdk/removeIf.kt");
diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/SignatureUtils.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/SignatureUtils.kt
index f46dcda..c121517 100644
--- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/SignatureUtils.kt
+++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/SignatureUtils.kt
@@ -69,6 +69,13 @@
"Double" to "D",
)
+private val PRIMITIVE_TYPE_ARRAYS_SIGNATURE: Map<String, String> =
+ PRIMITIVE_TYPE_SIGNATURE.map { (name, desc) ->
+ "${name}Array" to "[$desc"
+ }.toMap()
+
+private val PRIMITIVE_TYPE_OR_ARRAY_SIGNATURE: Map<String, String> = PRIMITIVE_TYPE_SIGNATURE + PRIMITIVE_TYPE_ARRAYS_SIGNATURE
+
fun ConeKotlinType.computeJvmDescriptorRepresentation(
typeConversion: (FirTypeRef) -> ConeKotlinType? = FirTypeRef::coneTypeSafe
): String = buildString {
@@ -82,7 +89,7 @@
(coneType as? ConeClassLikeType)?.let {
val classId = it.lookupTag.classId
if (classId.packageFqName.toString() == "kotlin") {
- PRIMITIVE_TYPE_SIGNATURE[classId.shortClassName.identifier]?.let { signature ->
+ PRIMITIVE_TYPE_OR_ARRAY_SIGNATURE[classId.shortClassName.identifier]?.let { signature ->
append(signature)
return
}
diff --git a/compiler/testData/codegen/box/jdk/noStringToCharArray.kt b/compiler/testData/codegen/box/jdk/noStringToCharArray.kt
new file mode 100644
index 0000000..f84f2d5
--- /dev/null
+++ b/compiler/testData/codegen/box/jdk/noStringToCharArray.kt
@@ -0,0 +1,4 @@
+// WITH_STDLIB
+internal val wildcardChars = "OK".toCharArray()
+
+fun box(): String = "${wildcardChars[0]}${wildcardChars[1]}"
diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
index 10f400e..8bb3b21 100644
--- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
+++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
@@ -28344,6 +28344,12 @@
}
@Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
+
+ @Test
@TestMetadata("removeIf.kt")
public void testRemoveIf() throws Exception {
runTest("compiler/testData/codegen/box/jdk/removeIf.kt");
diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
index 20c820a..593c38ad 100644
--- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
+++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
@@ -29760,6 +29760,12 @@
}
@Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
+
+ @Test
@TestMetadata("removeIf.kt")
public void testRemoveIf() throws Exception {
runTest("compiler/testData/codegen/box/jdk/removeIf.kt");
diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java
index a3dc996..e0fb8a7 100644
--- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java
+++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java
@@ -29760,6 +29760,12 @@
}
@Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
+
+ @Test
@TestMetadata("removeIf.kt")
public void testRemoveIf() throws Exception {
runTest("compiler/testData/codegen/box/jdk/removeIf.kt");
diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
index 0cfd823..ba58689 100644
--- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
+++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
@@ -23980,6 +23980,11 @@
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
+
@TestMetadata("removeIf.kt")
public void testRemoveIf() throws Exception {
runTest("compiler/testData/codegen/box/jdk/removeIf.kt");
diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java
index f487b9e..f28b767 100644
--- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java
+++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java
@@ -21630,6 +21630,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java
index a7ff387..51873de 100644
--- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java
+++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java
@@ -21768,6 +21768,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java
index 9e53aa2..4c0894d 100644
--- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java
+++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java
@@ -21768,6 +21768,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java
index d71fb99..0918d3a 100644
--- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java
+++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java
@@ -21768,6 +21768,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java
index 1155afd..de8d41d 100644
--- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java
+++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java
@@ -25002,6 +25002,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java
index e439095..257690b 100644
--- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java
+++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java
@@ -25512,6 +25512,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java
index 389581f..6dd22d6 100644
--- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java
+++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java
@@ -24747,6 +24747,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java
index ddf9391..3f1ee2d 100644
--- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java
+++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java
@@ -25257,6 +25257,12 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @Test
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@Nested
diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java
index f656d4d..7a0b36f 100644
--- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java
+++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java
@@ -19247,6 +19247,11 @@
public void testKt1397() throws Exception {
runTest("compiler/testData/codegen/box/jdk/kt1397.kt");
}
+
+ @TestMetadata("noStringToCharArray.kt")
+ public void testNoStringToCharArray() throws Exception {
+ runTest("compiler/testData/codegen/box/jdk/noStringToCharArray.kt");
+ }
}
@TestMetadata("compiler/testData/codegen/box/js")