diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/AbstractClassBuilder.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/AbstractClassBuilder.java index 5139f74cc0c..048d26836e3 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/AbstractClassBuilder.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/AbstractClassBuilder.java @@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.codegen.inline.FileMapping; import org.jetbrains.kotlin.codegen.inline.SMAPBuilder; +import org.jetbrains.kotlin.codegen.inline.SourceMapper; import org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings; import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin; import org.jetbrains.org.objectweb.asm.*; @@ -38,8 +39,6 @@ public abstract class AbstractClassBuilder implements ClassBuilder { private final JvmSerializationBindings serializationBindings = new JvmSerializationBindings(); - private final List fileMappings = new ArrayList<>(); - private String sourceName; private String debugInfo; @@ -106,15 +105,7 @@ public abstract class AbstractClassBuilder implements ClassBuilder { @Override public void done() { - if (!fileMappings.isEmpty() && GENERATE_SMAP) { - FileMapping origin = fileMappings.get(0); - assert sourceName == null || origin.getName().equals(sourceName) : "Error " + origin.getName() + " != " + sourceName; - getVisitor().visitSource(origin.getName(), new SMAPBuilder(origin.getName(), origin.getPath(), fileMappings).build()); - } - else { - getVisitor().visitSource(sourceName, debugInfo); - } - + getVisitor().visitSource(sourceName, debugInfo); getVisitor().visitEnd(); } @@ -134,10 +125,23 @@ public abstract class AbstractClassBuilder implements ClassBuilder { @Override public void visitSource(@NotNull String name, @Nullable String debug) { + assert sourceName == null || sourceName.equals(name) : "inconsistent file name: " + sourceName + " vs " + name; sourceName = name; debugInfo = debug; } + @Override + public void visitSMAP(@NotNull SourceMapper smap, boolean backwardsCompatibleSyntax) { + if (!GENERATE_SMAP) return; + + List fileMappings = smap.getResultMappings(); + if (fileMappings.isEmpty()) return; + + FileMapping origin = fileMappings.get(0); + SMAPBuilder builder = new SMAPBuilder(origin.getName(), origin.getPath(), fileMappings, backwardsCompatibleSyntax); + visitSource(origin.getName(), builder.build()); + } + @Override public void visitOuterClass(@NotNull String owner, @Nullable String name, @Nullable String desc) { getVisitor().visitOuterClass(owner, name, desc); @@ -154,9 +158,4 @@ public abstract class AbstractClassBuilder implements ClassBuilder { assert thisName != null : "This name isn't set"; return thisName; } - - @Override - public void addSMAP(FileMapping mapping) { - fileMappings.add(mapping); - } } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassBuilder.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassBuilder.java index 587364dea21..13f242d32c3 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassBuilder.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassBuilder.java @@ -20,6 +20,7 @@ import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.codegen.inline.FileMapping; +import org.jetbrains.kotlin.codegen.inline.SourceMapper; import org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings; import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin; import org.jetbrains.org.objectweb.asm.AnnotationVisitor; @@ -71,12 +72,12 @@ public interface ClassBuilder { void visitSource(@NotNull String name, @Nullable String debug); + void visitSMAP(@NotNull SourceMapper smap, boolean backwardsCompatibleSyntax); + void visitOuterClass(@NotNull String owner, @Nullable String name, @Nullable String desc); void visitInnerClass(@NotNull String name, @Nullable String outerName, @Nullable String innerName, int access); @NotNull String getThisName(); - - void addSMAP(FileMapping mapping); } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/DelegatingClassBuilder.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/DelegatingClassBuilder.java index 59796a797f6..362422dbd8c 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/DelegatingClassBuilder.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/DelegatingClassBuilder.java @@ -20,6 +20,7 @@ import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.codegen.inline.FileMapping; +import org.jetbrains.kotlin.codegen.inline.SourceMapper; import org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings; import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin; import org.jetbrains.org.objectweb.asm.AnnotationVisitor; @@ -98,6 +99,11 @@ public abstract class DelegatingClassBuilder implements ClassBuilder { getDelegate().visitSource(name, debug); } + @Override + public void visitSMAP(@NotNull SourceMapper smap, boolean backwardsCompatibleSyntax) { + getDelegate().visitSMAP(smap, backwardsCompatibleSyntax); + } + @Override public void visitOuterClass(@NotNull String owner, @Nullable String name, @Nullable String desc) { getDelegate().visitOuterClass(owner, name, desc); @@ -113,9 +119,4 @@ public abstract class DelegatingClassBuilder implements ClassBuilder { public String getThisName() { return getDelegate().getThisName(); } - - @Override - public void addSMAP(FileMapping mapping) { - getDelegate().addSMAP(mapping); - } } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java index 8b199f902a8..22511e1253e 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/MemberCodegen.java @@ -21,6 +21,7 @@ import org.jetbrains.kotlin.codegen.state.GenerationState; import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper; import org.jetbrains.kotlin.codegen.state.TypeMapperUtilsKt; import org.jetbrains.kotlin.config.ApiVersion; +import org.jetbrains.kotlin.config.LanguageFeature; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl; import org.jetbrains.kotlin.descriptors.annotations.Annotations; @@ -184,7 +185,7 @@ public abstract class MemberCodegen diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt index 8355090ed20..876836e8b30 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt @@ -23,7 +23,8 @@ const val KOTLIN_DEBUG_STRATA_NAME = "KotlinDebug" class SMAPBuilder( val source: String, val path: String, - private val fileMappings: List + private val fileMappings: List, + private val backwardsCompatibleSyntax: Boolean ) { private val header = "SMAP\n$source\nKotlin" @@ -39,25 +40,25 @@ class SMAPBuilder( val defaultStrata = generateDefaultStrata(realMappings) val debugStrata = generateDebugStrata(realMappings) - - return "$header\n$defaultStrata$debugStrata" + if (backwardsCompatibleSyntax && defaultStrata.isNotEmpty() && debugStrata.isNotEmpty()) { + // Old versions of kotlinc might fail if there is no END between defaultStrata and debugStrata. + // This is not actually correct syntax according to JSR-045. + return "$header\n$defaultStrata$END\n$debugStrata$END\n" + } + return "$header\n$defaultStrata$debugStrata$END\n" } private fun generateDefaultStrata(realMappings: List): String { val fileIds = FILE_SECTION + realMappings.mapIndexed { id, file -> "\n${file.toSMAPFile(id + 1)}" }.joinToString("") val lineMappings = LINE_SECTION + realMappings.joinToString("") { it.toSMAPMapping() } - return "$STRATA_SECTION $KOTLIN_STRATA_NAME\n$fileIds\n$lineMappings\n$END\n" + return "$STRATA_SECTION $KOTLIN_STRATA_NAME\n$fileIds\n$lineMappings\n" } private fun generateDebugStrata(realMappings: List): String { val combinedMapping = FileMapping(source, path) realMappings.forEach { fileMapping -> fileMapping.lineMappings.filter { it.callSiteMarker != null }.forEach { (_, dest, range, callSiteMarker) -> - combinedMapping.addRangeMapping( - RangeMapping( - callSiteMarker!!.lineNumber, dest, range - ) - ) + combinedMapping.addRangeMapping(RangeMapping(callSiteMarker!!.lineNumber, dest, range)) } } @@ -66,7 +67,7 @@ class SMAPBuilder( val newMappings = listOf(combinedMapping) val fileIds = FILE_SECTION + newMappings.mapIndexed { id, file -> "\n${file.toSMAPFile(id + 1)}" }.joinToString("") val lineMappings = LINE_SECTION + newMappings.joinToString("") { it.toSMAPMapping() } - return "$STRATA_SECTION $KOTLIN_DEBUG_STRATA_NAME\n$fileIds\n$lineMappings\n$END\n" + return "$STRATA_SECTION $KOTLIN_DEBUG_STRATA_NAME\n$fileIds\n$lineMappings\n" } private fun RangeMapping.toSMAP(fileId: Int): String { @@ -153,10 +154,6 @@ interface SourceMapper { } companion object { - fun flushToClassBuilder(mapper: SourceMapper, v: ClassBuilder) { - mapper.resultMappings.forEach { fileMapping -> v.addSMAP(fileMapping) } - } - fun createFromSmap(smap: SMAP): SourceMapper { return DefaultSourceMapper(smap.sourceInfo, smap.fileMappings) } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAPParser.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAPParser.kt index 9106cbd5f12..5e6b67c581d 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAPParser.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAPParser.kt @@ -42,6 +42,8 @@ object SMAPParser { fun parse(mappingInfo: String): SMAP { val fileMappings = linkedMapOf() + // Assuming we want the first stratum (which should be "Kotlin" for Kotlin classes, though you never know). + // Also, JSR-045 allows the line section to come before the file section, but we don't generate SMAPs like this. val iterator = mappingInfo.lineSequence().dropWhile { it.trim() != SMAP.FILE_SECTION }.drop(1).iterator() while (iterator.hasNext()) { val fileDeclaration = iterator.next().trim() @@ -59,7 +61,8 @@ object SMAPParser { } for (lineMapping in iterator) { - if (lineMapping.trim() == SMAP.END) break + // The stratum is terminated either by *E or another stratum. + if (lineMapping.trim().startsWith("*")) break /*only simple mapping now*/ val targetSplit = lineMapping.indexOf(':') val originalPart = lineMapping.substring(0, targetSplit) diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt index 2ef7c3c8ba9..03343364a55 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.codegen.inline.ReifiedTypeParametersUsages import org.jetbrains.kotlin.codegen.inline.SourceMapper import org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings import org.jetbrains.kotlin.codegen.serialization.JvmSerializerExtension +import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.ir.builders.declarations.buildFun @@ -185,7 +186,7 @@ open class ClassCodegen protected constructor( generateInnerAndOuterClasses() sourceMapper?.let { - SourceMapper.flushToClassBuilder(it, visitor) + visitor.visitSMAP(it, !context.state.languageVersionSettings.supportsFeature(LanguageFeature.CorrectSourceMappingSyntax)) } visitor.done() diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt index 8819c92e977..b7319d2b30e 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt @@ -237,6 +237,10 @@ class IrSourceCompilerForInline( TODO("not implemented") } + override fun visitSMAP(smap: SourceMapper, backwardsCompatibleSyntax: Boolean) { + TODO("not implemented") + } + override fun visitInnerClass(name: String, outerName: String?, innerName: String?, access: Int) { TODO("not implemented") } @@ -244,10 +248,6 @@ class IrSourceCompilerForInline( override fun getThisName(): String { TODO("not implemented") } - - override fun addSMAP(mapping: FileMapping?) { - TODO("not implemented") - } } } } diff --git a/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt b/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt new file mode 100644 index 00000000000..5a894ea1730 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt @@ -0,0 +1,62 @@ +// !LANGUAGE: +CorrectSourceMappingSyntax +// FILE: 1.kt +package test + +public inline fun inlineFun2(x: () -> String): String { + return x() +} + +public inline fun inlineFun(): String { + return inlineFun2 { + "OK" + } +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return inlineFun() +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,15:1 +6#1:16 +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +10#1:16 +*E + +// FILE: 2.smap +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,8:1 +10#2:9 +6#2,6:10 +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1:9 +5#1,6:10 +*E diff --git a/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt b/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt new file mode 100644 index 00000000000..46ba2cb2991 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt @@ -0,0 +1,64 @@ +// !LANGUAGE: -CorrectSourceMappingSyntax +// FILE: 1.kt +package test + +public inline fun inlineFun2(x: () -> String): String { + return x() +} + +public inline fun inlineFun(): String { + return inlineFun2 { + "OK" + } +} + +// FILE: 2.kt +import test.* + +fun box(): String { + return inlineFun() +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,15:1 +6#1:16 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +10#1:16 +*E + +// FILE: 2.smap +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,8:1 +10#2:9 +6#2,6:10 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +5#1:9 +5#1,6:10 +*E diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 2959bdbcd78..553b19fcf49 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -3280,6 +3280,16 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @TestMetadata("smapWithNewSyntax.kt") + public void testSmapWithNewSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); + } + + @TestMetadata("smapWithOldSyntax.kt") + public void testSmapWithOldSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index fa087fd0a90..debc1db7098 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3280,6 +3280,16 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @TestMetadata("smapWithNewSyntax.kt") + public void testSmapWithNewSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); + } + + @TestMetadata("smapWithOldSyntax.kt") + public void testSmapWithOldSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 43af79ec9b0..31f30af9b2a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -3280,6 +3280,16 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @TestMetadata("smapWithNewSyntax.kt") + public void testSmapWithNewSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); + } + + @TestMetadata("smapWithOldSyntax.kt") + public void testSmapWithOldSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index a585f2aadbf..8de6c51ea8f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3280,6 +3280,16 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @TestMetadata("smapWithNewSyntax.kt") + public void testSmapWithNewSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); + } + + @TestMetadata("smapWithOldSyntax.kt") + public void testSmapWithOldSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt index 4a4de7b5118..8e4885e08fe 100644 --- a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt +++ b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt @@ -129,6 +129,7 @@ enum class LanguageFeature( ProhibitInvisibleAbstractMethodsInSuperclasses(KOTLIN_1_5, kind = BUG_FIX), ProhibitNonReifiedArraysAsReifiedTypeArguments(KOTLIN_1_5, kind = BUG_FIX), ProhibitVarargAsArrayAfterSamArgument(KOTLIN_1_5, kind = BUG_FIX), + CorrectSourceMappingSyntax(KOTLIN_1_5, kind = UNSTABLE_FEATURE), // Temporarily disabled, see KT-27084/KT-22379 SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX), diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java index 7df55978643..5a622c98eb6 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java @@ -2895,6 +2895,16 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @TestMetadata("smapWithNewSyntax.kt") + public void testSmapWithNewSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); + } + + @TestMetadata("smapWithOldSyntax.kt") + public void testSmapWithOldSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java index 37e2235abad..32d5d5e1784 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java @@ -2895,6 +2895,16 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } + @TestMetadata("smapWithNewSyntax.kt") + public void testSmapWithNewSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithNewSyntax.kt"); + } + + @TestMetadata("smapWithOldSyntax.kt") + public void testSmapWithOldSyntax() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/smapWithOldSyntax.kt"); + } + @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)