diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/StringConcatGenerator.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/StringConcatGenerator.kt index 856fd9cc259..ec663f3f7e4 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/StringConcatGenerator.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/StringConcatGenerator.kt @@ -24,6 +24,7 @@ class StringConcatGenerator(val mode: JvmStringConcat, val mv: InstructionAdapte private val template = StringBuilder("") private val specialSymbolsInTemplate = arrayListOf() private val paramTypes = arrayListOf() + private var paramSlots = 0 private var justFlushed = false @JvmOverloads @@ -84,8 +85,9 @@ class StringConcatGenerator(val mode: JvmStringConcat, val mv: InstructionAdapte } else { justFlushed = false paramTypes.add(type) + paramSlots += type.size template.append("\u0001") - if (paramTypes.size == 200) { + if (paramSlots >= 200) { // Concatenate current arguments into string // because of `StringConcatFactory` limitation add use it as new argument for further processing: // "The number of parameter slots in {@code concatType} is less than or equal to 200" @@ -132,11 +134,15 @@ class StringConcatGenerator(val mode: JvmStringConcat, val mv: InstructionAdapte arrayOf() ) } + //clear old template template.clear() specialSymbolsInTemplate.clear() paramTypes.clear() + + //add just flushed string paramTypes.add(JAVA_STRING_TYPE) template.append("\u0001") + paramSlots = JAVA_STRING_TYPE.size } } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index d5b0fd6c39e..ecef50945a5 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -40266,6 +40266,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @Test + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @Test @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { diff --git a/compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt b/compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt new file mode 100644 index 00000000000..1df255a4e0a --- /dev/null +++ b/compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt @@ -0,0 +1,24 @@ +// Will be executed on JDK 9, 11, 15 +// IGNORE_BACKEND: ANDROID +// DONT_TARGET_EXACT_BACKEND: WASM +fun test(z: Int): String { + val result = "" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + z + "1" + + + return result +} + +fun box(): String { + val result = test(0) + + if (result.length != 280) + return "fail 1: ${result.length}" + + return if (result != "0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101") "fail 2: ${result}" else "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt b/compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt new file mode 100644 index 00000000000..e5baeb0371b --- /dev/null +++ b/compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt @@ -0,0 +1,26 @@ +// Will be executed on JDK 9, 11, 15 +// IGNORE_BACKEND: ANDROID +// DONT_TARGET_EXACT_BACKEND: WASM +fun test(z: Int): String { + val result = "" + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 1.toChar() + z + 2.toChar() + + + return result +} + +fun box(): String { + val result = test(0) + + if (result.length != 280) + return "fail 1: ${result.length}" + + return if (result != "0\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u00010\u0002") + "fail 2: ${result}" + else "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/java9/box/concatDynamic200Long.kt b/compiler/testData/codegen/java9/box/concatDynamic200Long.kt new file mode 100644 index 00000000000..8a0f4c2e55a --- /dev/null +++ b/compiler/testData/codegen/java9/box/concatDynamic200Long.kt @@ -0,0 +1,27 @@ +// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants +// JVM_TARGET: 9 +fun test(z: Long): String { + val result = "" + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z //200 z + + return result +} + +fun box(): String { + val result = test(0L) + + if (result.length != 200) + return "fail 1: ${result.length}" + + return if (result != "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + "fail 2: ${result}" + else "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt b/compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt new file mode 100644 index 00000000000..c81aca25d94 --- /dev/null +++ b/compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt @@ -0,0 +1,27 @@ +// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy +// JVM_TARGET: 9 +fun test(z: Long): String { + val result = "" + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z //200 z + + return result +} + +fun box(): String { + val result = test(0L) + + if (result.length != 200) + return "fail 1: ${result.length}" + + return if (result != "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + "fail 2: ${result}" + else "OK" +} \ No newline at end of file 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 fb455fe1901..51d9a7b7dae 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 @@ -40224,6 +40224,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @Test + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @Test @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { 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 b871627cb5a..4e2b9d14e7d 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 @@ -40266,6 +40266,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @Test + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @Test @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9BlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9BlackBoxCodegenTestGenerated.java index d77b3f8c3a1..a6d0596031f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9BlackBoxCodegenTestGenerated.java @@ -39,6 +39,11 @@ public class Jdk9BlackBoxCodegenTestGenerated extends AbstractJdk9BlackBoxCodege runTest("compiler/testData/codegen/java9/box/concatDynamic200.kt"); } + @TestMetadata("concatDynamic200Long.kt") + public void testConcatDynamic200Long() throws Exception { + runTest("compiler/testData/codegen/java9/box/concatDynamic200Long.kt"); + } + @TestMetadata("concatDynamic201.kt") public void testConcatDynamic201() throws Exception { runTest("compiler/testData/codegen/java9/box/concatDynamic201.kt"); @@ -49,6 +54,11 @@ public class Jdk9BlackBoxCodegenTestGenerated extends AbstractJdk9BlackBoxCodege runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200.kt"); } + @TestMetadata("concatDynamicIndy200Long.kt") + public void testConcatDynamicIndy200Long() throws Exception { + runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt"); + } + @TestMetadata("concatDynamicIndy201.kt") public void testConcatDynamicIndy201() throws Exception { runTest("compiler/testData/codegen/java9/box/concatDynamicIndy201.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9IrBlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9IrBlackBoxCodegenTestGenerated.java index b67c72fa2b7..9e273b2acbb 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/Jdk9IrBlackBoxCodegenTestGenerated.java @@ -40,6 +40,11 @@ public class Jdk9IrBlackBoxCodegenTestGenerated extends AbstractJdk9IrBlackBoxCo runTest("compiler/testData/codegen/java9/box/concatDynamic200.kt"); } + @TestMetadata("concatDynamic200Long.kt") + public void testConcatDynamic200Long() throws Exception { + runTest("compiler/testData/codegen/java9/box/concatDynamic200Long.kt"); + } + @TestMetadata("concatDynamic201.kt") public void testConcatDynamic201() throws Exception { runTest("compiler/testData/codegen/java9/box/concatDynamic201.kt"); @@ -50,6 +55,11 @@ public class Jdk9IrBlackBoxCodegenTestGenerated extends AbstractJdk9IrBlackBoxCo runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200.kt"); } + @TestMetadata("concatDynamicIndy200Long.kt") + public void testConcatDynamicIndy200Long() throws Exception { + runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt"); + } + @TestMetadata("concatDynamicIndy201.kt") public void testConcatDynamicIndy201() throws Exception { runTest("compiler/testData/codegen/java9/box/concatDynamicIndy201.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 7bcb83c34fe..0ab19bf9830 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -32259,6 +32259,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 05d0637cacb..564b73d2989 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -27014,6 +27014,16 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 09a50bbc603..17cf357a9ec 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -26420,6 +26420,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 355ef4cd11d..1c2a63b2d35 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -26380,6 +26380,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @TestMetadata("concatDynamicWithConstants.kt") + public void testConcatDynamicWithConstants() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithConstants.kt"); + } + + @TestMetadata("concatDynamicWithSpecialSymbols.kt") + public void testConcatDynamicWithSpecialSymbols() throws Exception { + runTest("compiler/testData/codegen/box/strings/concatDynamicWithSpecialSymbols.kt"); + } + @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt");