diff --git a/compiler/fir/fir2ir/testFixtures/org/jetbrains/kotlin/test/TestGeneratorForFir2IrTests.kt b/compiler/fir/fir2ir/testFixtures/org/jetbrains/kotlin/test/TestGeneratorForFir2IrTests.kt index 534987a6d5aac..788229c93cabe 100644 --- a/compiler/fir/fir2ir/testFixtures/org/jetbrains/kotlin/test/TestGeneratorForFir2IrTests.kt +++ b/compiler/fir/fir2ir/testFixtures/org/jetbrains/kotlin/test/TestGeneratorForFir2IrTests.kt @@ -30,6 +30,10 @@ fun main(args: Array) { model("codegen/box", excludeDirs = k1BoxTestDir + excludedScriptDirs) } + testClass { + model("codegen/box", excludeDirs = k1BoxTestDir + excludedScriptDirs) + } + testClass { model("codegen/box", excludeDirs = k1BoxTestDir) } diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt index 22cfd630c50f8..15fed626ceddd 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt @@ -1,6 +1,8 @@ // LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm // WITH_STDLIB // WITH_COROUTINES +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 import helpers.* import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* diff --git a/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt b/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt index 27a83ad583f0f..f8fe221ad8eb8 100644 --- a/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt +++ b/compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt @@ -1,6 +1,8 @@ // LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm // WITH_STDLIB // WITH_COROUTINES +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 import helpers.* import kotlin.coroutines.* import kotlin.coroutines.intrinsics.* diff --git a/compiler/testData/codegen/box/enum/nameClashWithCompanion.kt b/compiler/testData/codegen/box/enum/nameClashWithCompanion.kt index b648473c8cd1b..8669be4165212 100644 --- a/compiler/testData/codegen/box/enum/nameClashWithCompanion.kt +++ b/compiler/testData/codegen/box/enum/nameClashWithCompanion.kt @@ -1,5 +1,6 @@ // TARGET_BACKEND: JVM // IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6 +// IGNORE_HEADER_MODE: JVM_IR // FIR status: don't support legacy feature (see https://youtrack.jetbrains.com/issue/KT-37591). UNRESOLVED_REFERENCE at '+' // WITH_STDLIB // MODULE: lib diff --git a/compiler/testData/codegen/box/extensionClasses/simple.kt b/compiler/testData/codegen/box/extensionClasses/simple.kt index b889c774fc1cd..4b5e24b8ce2ae 100644 --- a/compiler/testData/codegen/box/extensionClasses/simple.kt +++ b/compiler/testData/codegen/box/extensionClasses/simple.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR class A { val ok = "OK" diff --git a/compiler/testData/codegen/box/extensionClasses/typealiasForContextualClass.kt b/compiler/testData/codegen/box/extensionClasses/typealiasForContextualClass.kt index b4fca46198391..d075fc3c49467 100644 --- a/compiler/testData/codegen/box/extensionClasses/typealiasForContextualClass.kt +++ b/compiler/testData/codegen/box/extensionClasses/typealiasForContextualClass.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR class A { val ok = "OK" diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextualInlineCall.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextualInlineCall.kt index e41e4df8d3ce1..4d0e0d30b3cb4 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextualInlineCall.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextualInlineCall.kt @@ -1,5 +1,6 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR // TARGET_BACKEND: JVM_IR // KT-51271 diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/compareTo.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/compareTo.kt index 44beb99e40f90..e4a577493699a 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/compareTo.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/compareTo.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY // TARGET_BACKEND: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR data class Pair(val first: A, val second: B) diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt index 927a9978a20d4..694100cc5046d 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY // TARGET_BACKEND: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR // WITH_STDLIB fun List.decimateEveryEvenThird() = sequence { diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/dp.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/dp.kt index 4d6a88cb343bf..f51576298641c 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/dp.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/fromKEEP/dp.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY // TARGET_BACKEND: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR // WITH_STDLIB class View { diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/iteratorOperator.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/iteratorOperator.kt index 5c89f2f735cc5..4c64140ddde7e 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/iteratorOperator.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/iteratorOperator.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR // WITH_STDLIB data class Counter(var i: Int = 0) diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51277.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51277.kt index fba809e62b16d..0dcb32f70d8b1 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51277.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt51277.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY // TARGET_BACKEND: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR class C { fun foo() = 1 diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/suspendContextualWithExtension.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/suspendContextualWithExtension.kt index edaf3cb4661ce..4806850cd179a 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/suspendContextualWithExtension.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/suspendContextualWithExtension.kt @@ -1,5 +1,6 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR // TARGET_BACKEND: JVM_IR // WITH_COROUTINES // WITH_STDLIB diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModule.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModule.kt index f91eb42a00866..fab7591f3169b 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModule.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModule.kt @@ -1,6 +1,7 @@ // LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR // MODULE: lib // FILE: A.kt diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModuleSuspending.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModuleSuspending.kt index 0a69054529dbc..c158b2e262d54 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModuleSuspending.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/useFromAnotherModuleSuspending.kt @@ -1,5 +1,6 @@ // LANGUAGE: +ContextReceivers // IGNORE_BACKEND_K2: ANY +// IGNORE_HEADER_MODE: JVM_IR // TARGET_BACKEND: JVM_IR // WITH_STDLIB // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt b/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt index cf541e2edb46d..abdf021b41c47 100644 --- a/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt +++ b/compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt @@ -1,3 +1,6 @@ +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 + class Test { private fun T.self() = object{ fun calc() : T { diff --git a/compiler/testData/codegen/box/fir/ColorValuePanel.kt b/compiler/testData/codegen/box/fir/ColorValuePanel.kt index b1d896558a8ef..153a665015e9f 100644 --- a/compiler/testData/codegen/box/fir/ColorValuePanel.kt +++ b/compiler/testData/codegen/box/fir/ColorValuePanel.kt @@ -2,6 +2,8 @@ // IGNORE_BACKEND: ANDROID // WITH_STDLIB // FULL_JDK +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 import java.awt.GridLayout import javax.swing.JPanel diff --git a/compiler/testData/codegen/box/fir/copyOnObject.kt b/compiler/testData/codegen/box/fir/copyOnObject.kt index 02f52e2b7a3de..1577df1ad3cc5 100644 --- a/compiler/testData/codegen/box/fir/copyOnObject.kt +++ b/compiler/testData/codegen/box/fir/copyOnObject.kt @@ -1,5 +1,7 @@ // IGNORE_BACKEND_K1: ANY // ISSUE: KT-60370 +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82378 data object A { fun copy() = "O" diff --git a/compiler/testData/codegen/box/inference/pcla/issues/kt67993.kt b/compiler/testData/codegen/box/inference/pcla/issues/kt67993.kt index a21c6ffc4b375..0cca82c14245b 100644 --- a/compiler/testData/codegen/box/inference/pcla/issues/kt67993.kt +++ b/compiler/testData/codegen/box/inference/pcla/issues/kt67993.kt @@ -1,4 +1,6 @@ // ISSUE: KT-67993 +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82336 fun box(): String { return Klass().buildee.produce() diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassBothEqualsOverride.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassBothEqualsOverride.kt index d068479eda32b..f068a24703374 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassBothEqualsOverride.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassBothEqualsOverride.kt @@ -2,6 +2,8 @@ // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 interface I { diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsConsistency.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsConsistency.kt index fd5d016b4c814..95a29f9a54793 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsConsistency.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsConsistency.kt @@ -2,6 +2,8 @@ // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 import java.lang.AssertionError import kotlin.math.abs diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverriddenForCollections.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverriddenForCollections.kt index 908f17f099b28..41cf3f9d1de2b 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverriddenForCollections.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverriddenForCollections.kt @@ -2,6 +2,8 @@ // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 import kotlin.math.abs diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverride.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverride.kt index 5ccd8ea62cbec..45af123c8e461 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverride.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassEqualsOverride.kt @@ -2,6 +2,8 @@ // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 import kotlin.math.abs diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassTypedEqualsGenerics.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassTypedEqualsGenerics.kt index 8c3ed3b0e850d..d98d82eccb652 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassTypedEqualsGenerics.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassTypedEqualsGenerics.kt @@ -2,6 +2,8 @@ // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 @JvmInline value class IC1(val x: T) { diff --git a/compiler/testData/codegen/box/inlineClasses/inlineOverInlineWithCustomEquals.kt b/compiler/testData/codegen/box/inlineClasses/inlineOverInlineWithCustomEquals.kt index 1daef70b30653..7e3387d728135 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineOverInlineWithCustomEquals.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineOverInlineWithCustomEquals.kt @@ -1,7 +1,8 @@ // WITH_STDLIB // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR - +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 @JvmInline value class A(val x: Int) { diff --git a/compiler/testData/codegen/box/inlineClasses/kt54536.kt b/compiler/testData/codegen/box/inlineClasses/kt54536.kt index a96e786d4954f..419a72cdde348 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt54536.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt54536.kt @@ -1,6 +1,8 @@ // WITH_STDLIB // LANGUAGE: +ValueClasses, +CustomEqualsInValueClasses // TARGET_BACKEND: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82311 @JvmInline value class A(val x: Int) { diff --git a/compiler/testData/codegen/box/ir/anonymousClassLeak.kt b/compiler/testData/codegen/box/ir/anonymousClassLeak.kt index e17fcb1eae166..d7c66d15b57af 100644 --- a/compiler/testData/codegen/box/ir/anonymousClassLeak.kt +++ b/compiler/testData/codegen/box/ir/anonymousClassLeak.kt @@ -1,4 +1,6 @@ // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 // MODULE: lib // FILE: lib.kt diff --git a/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaFieldKotlinPropertyJavaPackagePrivate.kt b/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaFieldKotlinPropertyJavaPackagePrivate.kt index a43b2cbf202dd..0d919c26458a7 100644 --- a/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaFieldKotlinPropertyJavaPackagePrivate.kt +++ b/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaFieldKotlinPropertyJavaPackagePrivate.kt @@ -2,6 +2,7 @@ // COMMENTED[LANGUAGE: +ProperFieldAccessGenerationForFieldAccessShadowedByKotlinProperty] uncomment when KT-56386 is fixed // IGNORE_BACKEND_K1: JVM_IR // IGNORE_BACKEND_K2: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR // Reason: KT-56386 is not fixed yet // CHECK_BYTECODE_TEXT diff --git a/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisibleProperty.kt b/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisibleProperty.kt index 8a88430c7aa72..0d263d57b5799 100644 --- a/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisibleProperty.kt +++ b/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisibleProperty.kt @@ -2,6 +2,7 @@ // COMMENTED[LANGUAGE: +ProperFieldAccessGenerationForFieldAccessShadowedByKotlinProperty] uncomment when KT-56386 is fixed // IGNORE_BACKEND_K1: JVM_IR // IGNORE_BACKEND_K2: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR // Reason: KT-56386 is not fixed yet // FILE: BaseJava.java diff --git a/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisiblePropertyReference.kt b/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisiblePropertyReference.kt index dc2fa426a8fb5..50c05e11a3ed8 100644 --- a/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisiblePropertyReference.kt +++ b/compiler/testData/codegen/box/javaFieldAndKotlinProperty/javaProtectedFieldAndKotlinInvisiblePropertyReference.kt @@ -2,6 +2,7 @@ // COMMENTED[LANGUAGE: +ProperFieldAccessGenerationForFieldAccessShadowedByKotlinProperty] uncomment when KT-56386 is fixed // IGNORE_BACKEND_K1: JVM_IR // IGNORE_BACKEND_K2: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR // Reason: KT-56386 is not fixed yet // FILE: BaseJava.java diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/bridge.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/bridge.kt index 87b0a12e505a7..58486a985ae61 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/bridge.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/bridge.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties.kt index 9c9766ad827f4..1598e52c4c087 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties2.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties2.kt index 566154c12bc43..765a6d76c8d3f 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties2.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties2.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties3.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties3.kt index a9252db220d62..fa5554e2363bd 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties3.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/bridgeWithProperties3.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface3 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/callStackTrace.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/callStackTrace.kt index 1cdf587ce5248..918d9d92cc5a1 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/callStackTrace.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/callStackTrace.kt @@ -3,6 +3,8 @@ // FULL_JDK // WITH_STDLIB // JVM_TARGET: 1.8 +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface { diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/inheritedJvmDefault.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/inheritedJvmDefault.kt index f68e2318a650d..bd0548d9d05cf 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/inheritedJvmDefault.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/inheritedJvmDefault.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/enable/simpleFunction.kt b/compiler/testData/codegen/box/jvm8/defaults/enable/simpleFunction.kt index 086adc768e67f..02844039b1364 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/enable/simpleFunction.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/enable/simpleFunction.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge.kt index 82b52163a0660..586c97d955b8d 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge2.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge2.kt index b0ed300d7baba..43b5c7c39df46 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge2.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge2.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge3.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge3.kt index 7561ef662b846..8eb71d04f375d 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge3.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridge3.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface3 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties.kt index ceb265557a94a..07cadbf9ac005 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties2.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties2.kt index adb18f672a996..ff476660a07a9 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties2.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties2.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties3.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties3.kt index b3f8f4c41126c..dc22e806db4f3 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties3.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/bridgeWithProperties3.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface3 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/inheritedJvmDefault.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/inheritedJvmDefault.kt index 689f713e65036..610c18c85ebdf 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/inheritedJvmDefault.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/inheritedJvmDefault.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface2 { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/simpleFunction.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/simpleFunction.kt index 70dfc8791c751..3772d12388495 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/simpleFunction.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/simpleFunction.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface { diff --git a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/withCompatibility/simple.kt b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/withCompatibility/simple.kt index 6e7aa0788ae39..c033c5742df2e 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/withCompatibility/simple.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/noCompatibility/withCompatibility/simple.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_STDLIB +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82408 // FILE: Simple.java public interface Simple extends KInterface { diff --git a/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt b/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt index e19a397188593..10b4b24c68172 100644 --- a/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt +++ b/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt @@ -1,4 +1,6 @@ // ISSUE: KT-57222 +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 interface Invariant diff --git a/compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt b/compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt index c2f14068bfe44..1604417dcdc30 100644 --- a/compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt +++ b/compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt @@ -1,3 +1,6 @@ +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 + interface IFoo { fun foo(): String } diff --git a/compiler/testData/codegen/box/objects/kt46136.kt b/compiler/testData/codegen/box/objects/kt46136.kt index 748eacab3a455..415c30bd4e42c 100644 --- a/compiler/testData/codegen/box/objects/kt46136.kt +++ b/compiler/testData/codegen/box/objects/kt46136.kt @@ -1,3 +1,6 @@ +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82376 + abstract class A { fun print() = "OK" } diff --git a/compiler/testData/codegen/box/valueClasses/complex.kt b/compiler/testData/codegen/box/valueClasses/complex.kt index a947d2d3ee093..04e0fc84e0ded 100644 --- a/compiler/testData/codegen/box/valueClasses/complex.kt +++ b/compiler/testData/codegen/box/valueClasses/complex.kt @@ -3,6 +3,8 @@ // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND: ANDROID // LANGUAGE: +ValueClasses, +ValueClassesSecondaryConstructorWithBody +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82407 @JvmInline value class A(val x: List) diff --git a/compiler/testData/codegen/box/valueClasses/nothingAsParameterType.kt b/compiler/testData/codegen/box/valueClasses/nothingAsParameterType.kt index 91c3090063c76..ec754e3539706 100644 --- a/compiler/testData/codegen/box/valueClasses/nothingAsParameterType.kt +++ b/compiler/testData/codegen/box/valueClasses/nothingAsParameterType.kt @@ -2,6 +2,8 @@ // WORKS_WHEN_VALUE_CLASS // LANGUAGE: +ValueClasses // TARGET_BACKEND: JVM_IR +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82407 interface I { fun f(x: T) = println(x) diff --git a/compiler/testData/codegen/box/valueClasses/overrides.kt b/compiler/testData/codegen/box/valueClasses/overrides.kt index d4b3be263da9e..ccc1cb5506f16 100644 --- a/compiler/testData/codegen/box/valueClasses/overrides.kt +++ b/compiler/testData/codegen/box/valueClasses/overrides.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM_IR // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82407 interface AbstractPoint { val x: T diff --git a/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt b/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt index ee2de8be224f7..7dbb6a704d5be 100644 --- a/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt +++ b/compiler/testData/codegen/box/valueClasses/overrides_inlineClass.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM_IR // LANGUAGE: +ValueClasses // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82407 interface AbstractPoint { val x: T diff --git a/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt b/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt index 581eb117d0b0b..d9f6489f42b4e 100644 --- a/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt +++ b/compiler/testData/codegen/box/valueClasses/overrides_typeParameters.kt @@ -2,6 +2,8 @@ // TARGET_BACKEND: JVM_IR // LANGUAGE: +ValueClasses, +GenericInlineClassParameter // CHECK_BYTECODE_LISTING +// IGNORE_HEADER_MODE: JVM_IR +// Reason: KT-82407 interface AbstractPoint { val x: T diff --git a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/configuration/BaseCodegenConfiguration.kt b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/configuration/BaseCodegenConfiguration.kt index a770bfacdff53..d0c18aa7ffdda 100644 --- a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/configuration/BaseCodegenConfiguration.kt +++ b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/configuration/BaseCodegenConfiguration.kt @@ -237,17 +237,14 @@ fun TestConfigurationBuilder.baseFirBlackBoxCodegenTestDirectivesConfiguration() /** * Setups the backend-specific handlers and directives exclusively used by JVM box tests */ -fun TestConfigurationBuilder.configureJvmBoxCodegenSettings(includeAllDumpHandlers: Boolean) { +fun TestConfigurationBuilder.configureJvmBoxCodegenSettings(includeAllDumpHandlers: Boolean, includeBytecodeTextHandler: Boolean = true) { configureJvmArtifactsHandlersStep { if (includeAllDumpHandlers) { - useHandlers( - ::BytecodeListingHandler, - ) + useHandlers(::BytecodeListingHandler,) + } + if (includeBytecodeTextHandler) { + useHandlers(::BytecodeTextHandler.bind(true)) } - - useHandlers( - ::BytecodeTextHandler.bind(true) - ) } defaultDirectives { diff --git a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt index dc255f541731f..d416ac90a4ba0 100644 --- a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt +++ b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/directives/CodegenTestDirectives.kt @@ -45,6 +45,8 @@ object CodegenTestDirectives : SimpleDirectivesContainer() { val IGNORE_HMPP by enumDirective("Ignore test in HMPP setup") + val IGNORE_HEADER_MODE by enumDirective("Ignore test in header mode setup") + val IGNORE_ANALYSIS_API_BASED_TYPESCRIPT_EXPORT by enumDirective("Ignore failures of the new AA-based TypeScript Export") val JAVAC_OPTIONS by stringDirective( diff --git a/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/runners/codegen/AbstractFirHeaderModeCodegenTest.kt b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/runners/codegen/AbstractFirHeaderModeCodegenTest.kt new file mode 100644 index 0000000000000..49b4817660f00 --- /dev/null +++ b/compiler/tests-common-new/testFixtures/org/jetbrains/kotlin/test/runners/codegen/AbstractFirHeaderModeCodegenTest.kt @@ -0,0 +1,56 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.runners.codegen + +import org.jetbrains.kotlin.test.FirParser +import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor +import org.jetbrains.kotlin.test.backend.ir.BackendCliJvmFacade +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder +import org.jetbrains.kotlin.test.builders.configureFirHandlersStep +import org.jetbrains.kotlin.test.configuration.commonConfigurationForJvmTest +import org.jetbrains.kotlin.test.configuration.configureJvmBoxCodegenSettings +import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_HEADER_MODE +import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives.HEADER_MODE +import org.jetbrains.kotlin.test.directives.configureFirParser +import org.jetbrains.kotlin.test.frontend.fir.Fir2IrCliJvmFacade +import org.jetbrains.kotlin.test.frontend.fir.FirCliJvmFacade +import org.jetbrains.kotlin.test.frontend.fir.handlers.FirDiagnosticsHandler +import org.jetbrains.kotlin.test.model.FrontendKinds +import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest + +abstract class AbstractFirHeaderModeCodegenTestBase( + val parser: FirParser +) : AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) { + override fun configure(builder: TestConfigurationBuilder): Unit = with(builder) { + configureFirParser(parser) + + defaultDirectives { + +HEADER_MODE + } + + commonConfigurationForJvmTest( + FrontendKinds.FIR, + ::FirCliJvmFacade, + ::Fir2IrCliJvmFacade, + ::BackendCliJvmFacade, + ) + + configureFirHandlersStep { + useHandlers( + ::FirDiagnosticsHandler + ) + } + + useAfterAnalysisCheckers( + { BlackBoxCodegenSuppressor(it, customIgnoreDirective = IGNORE_HEADER_MODE) }, + ) + + configureJvmBoxCodegenSettings(includeAllDumpHandlers = false, includeBytecodeTextHandler = false) + } +} + +open class AbstractFirLightTreeHeaderModeCodegenTest : AbstractFirHeaderModeCodegenTestBase(FirParser.LightTree)