diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index bffceda3699..c28e648ab3f 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -1262,11 +1262,18 @@ class Fir2IrVisitor( override fun visitResolvedQualifier(resolvedQualifier: FirResolvedQualifier, data: Any?): IrElement { val classSymbol = resolvedQualifier.symbol if (classSymbol != null) { + val resultingSymbol = when (val klass = classSymbol.fir) { + is FirRegularClass -> { + if (klass.classKind in listOf(ClassKind.OBJECT, ClassKind.ENUM_ENTRY)) classSymbol + else klass.companionObject?.symbol ?: classSymbol + } + else -> classSymbol + } return resolvedQualifier.convertWithOffsets { startOffset, endOffset -> IrGetObjectValueImpl( startOffset, endOffset, resolvedQualifier.typeRef.toIrType(), - classSymbol.toIrSymbol(session, declarationStorage) as IrClassSymbol + resultingSymbol.toIrSymbol(session, declarationStorage) as IrClassSymbol ) } } diff --git a/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt b/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt index 091abc475d9..5ce636926d5 100644 --- a/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt +++ b/compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR import kotlin.reflect.KProperty1 class A { diff --git a/compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt b/compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt index c02581b6988..814f87dbdb5 100644 --- a/compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt +++ b/compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: CompanionInitialization.java diff --git a/compiler/testData/codegen/box/classes/classObject.kt b/compiler/testData/codegen/box/classes/classObject.kt index 6d73adfebc3..c8da87c8a7f 100644 --- a/compiler/testData/codegen/box/classes/classObject.kt +++ b/compiler/testData/codegen/box/classes/classObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class C() { companion object { fun create() = C() diff --git a/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt b/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt index 76182e127e9..886dbdf8364 100644 --- a/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt +++ b/compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun Any.foo() = 1 class A { diff --git a/compiler/testData/codegen/box/classes/classObjectField.kt b/compiler/testData/codegen/box/classes/classObjectField.kt index 774f20ed4ff..f23073c6e89 100644 --- a/compiler/testData/codegen/box/classes/classObjectField.kt +++ b/compiler/testData/codegen/box/classes/classObjectField.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A() { companion object { val value = 10 diff --git a/compiler/testData/codegen/box/classes/classObjectInTrait.kt b/compiler/testData/codegen/box/classes/classObjectInTrait.kt index 9071a67c699..18fd4085c41 100644 --- a/compiler/testData/codegen/box/classes/classObjectInTrait.kt +++ b/compiler/testData/codegen/box/classes/classObjectInTrait.kt @@ -1,5 +1,4 @@ -// IGNORE_BACKEND_FIR: JVM_IR -// EA-38323 - Illegal field modifiers in class: classObject field in C must be static and final +// EA-38323 - Illegal field modifiers in class: classObject field in C must be static and final interface C { companion object { diff --git a/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt b/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt index 7e90287af98..e2a775320cd 100644 --- a/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt +++ b/compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { companion object { fun values() = "O" diff --git a/compiler/testData/codegen/box/classes/classObjectToString.kt b/compiler/testData/codegen/box/classes/classObjectToString.kt index e0bb06bae64..43d10f8ef9a 100644 --- a/compiler/testData/codegen/box/classes/classObjectToString.kt +++ b/compiler/testData/codegen/box/classes/classObjectToString.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TODO: Enable for JS when it supports Java class library. // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt b/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt index 32a362301b9..bb7b150238f 100644 --- a/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt +++ b/compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class C() { companion object { private fun create() = C() diff --git a/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt b/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt index 219240533b2..dd3efea880b 100644 --- a/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt +++ b/compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class C() { companion object Foo } diff --git a/compiler/testData/codegen/box/classes/kt2384.kt b/compiler/testData/codegen/box/classes/kt2384.kt index 40db468e96c..d990d4cbc00 100644 --- a/compiler/testData/codegen/box/classes/kt2384.kt +++ b/compiler/testData/codegen/box/classes/kt2384.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { companion object { val b = 0 diff --git a/compiler/testData/codegen/box/classes/kt2784.kt b/compiler/testData/codegen/box/classes/kt2784.kt index 4aeeabfb7be..fc7c5dfccbe 100644 --- a/compiler/testData/codegen/box/classes/kt2784.kt +++ b/compiler/testData/codegen/box/classes/kt2784.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class Factory(p: Int) class A { diff --git a/compiler/testData/codegen/box/classes/kt504.kt b/compiler/testData/codegen/box/classes/kt504.kt index b093e3f6cef..2f55f67acdd 100644 --- a/compiler/testData/codegen/box/classes/kt504.kt +++ b/compiler/testData/codegen/box/classes/kt504.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR package mult_constructors_3_bug public open class Identifier() { diff --git a/compiler/testData/codegen/box/classes/namedClassObject.kt b/compiler/testData/codegen/box/classes/namedClassObject.kt index a1e2bd60aff..2ff7587752d 100644 --- a/compiler/testData/codegen/box/classes/namedClassObject.kt +++ b/compiler/testData/codegen/box/classes/namedClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class C() { companion object Foo { fun create() = 3 diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt b/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt index 4e3b427556c..ca4275a7403 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Foo private constructor(val param: String = "OK") { companion object { val s = Foo() diff --git a/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt b/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt index 7b958663e52..876be1766c2 100644 --- a/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt +++ b/compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { companion object { fun Int.foo(a: Int = 1): Int { diff --git a/compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt b/compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt index 05279a94e83..64fe7c2de65 100644 --- a/compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt +++ b/compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KT-5786 NoSuchMethodError: no accessor for private fun with default arguments class A { diff --git a/compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt b/compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt index 06216cf0bbf..7b4ba263678 100644 --- a/compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt +++ b/compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var state: String = "Fail" class A private constructor(x: String = "OK") { diff --git a/compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt b/compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt index 8205dcbc56d..ea7569669e5 100644 --- a/compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt +++ b/compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var state: String = "Fail" class A { diff --git a/compiler/testData/codegen/box/extensionFunctions/kt4228.kt b/compiler/testData/codegen/box/extensionFunctions/kt4228.kt index 84249fb7c93..9906d20305f 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt4228.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt4228.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { companion object } diff --git a/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt b/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt index c0a8b6b6b54..7bf67aa45a1 100644 --- a/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt +++ b/compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Test(val prop: String) { companion object { diff --git a/compiler/testData/codegen/box/fieldRename/jvmFieldNoClash1.kt b/compiler/testData/codegen/box/fieldRename/jvmFieldNoClash1.kt index ec1bc2b0170..3a3fd51a02a 100644 --- a/compiler/testData/codegen/box/fieldRename/jvmFieldNoClash1.kt +++ b/compiler/testData/codegen/box/fieldRename/jvmFieldNoClash1.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/functions/kt2716.kt b/compiler/testData/codegen/box/functions/kt2716.kt index ed09bc7038c..0ba57fd380a 100644 --- a/compiler/testData/codegen/box/functions/kt2716.kt +++ b/compiler/testData/codegen/box/functions/kt2716.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR package someTest public class Some private constructor(val v: String) { diff --git a/compiler/testData/codegen/box/ieee754/differentTypesComparison.kt b/compiler/testData/codegen/box/ieee754/differentTypesComparison.kt index 310690aaa9d..a29c56f7142 100644 --- a/compiler/testData/codegen/box/ieee754/differentTypesComparison.kt +++ b/compiler/testData/codegen/box/ieee754/differentTypesComparison.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: NATIVE fun box(): String { if (0.toByte().compareTo(-0.0) != 1) return "fail 1.1" diff --git a/compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt b/compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt index 598e6380b1d..23104938a02 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt28920_javaPrimitiveType.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/innerNested/nestedClassObject.kt b/compiler/testData/codegen/box/innerNested/nestedClassObject.kt index 6d57104afee..8e470a4e58e 100644 --- a/compiler/testData/codegen/box/innerNested/nestedClassObject.kt +++ b/compiler/testData/codegen/box/innerNested/nestedClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Outer { class Nested { companion object { diff --git a/compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt b/compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt index ffca4784df4..80e774ed6b7 100644 --- a/compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt +++ b/compiler/testData/codegen/box/jvm8/defaults/accessorFromCompanion.kt @@ -1,5 +1,4 @@ // !JVM_DEFAULT_MODE: enable -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // JVM_TARGET: 1.8 // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmField/annotationCompanion.kt b/compiler/testData/codegen/box/jvmField/annotationCompanion.kt index c09219addc6..26741f1dda1 100644 --- a/compiler/testData/codegen/box/jvmField/annotationCompanion.kt +++ b/compiler/testData/codegen/box/jvmField/annotationCompanion.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +JvmFieldInInterface +NestedClassesInAnnotations -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmField/initializersOrder.kt b/compiler/testData/codegen/box/jvmField/initializersOrder.kt index 90626d6d28b..13950584c96 100644 --- a/compiler/testData/codegen/box/jvmField/initializersOrder.kt +++ b/compiler/testData/codegen/box/jvmField/initializersOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmField/interfaceCompanion.kt b/compiler/testData/codegen/box/jvmField/interfaceCompanion.kt index 03e08e97d64..f99d3fec96a 100644 --- a/compiler/testData/codegen/box/jvmField/interfaceCompanion.kt +++ b/compiler/testData/codegen/box/jvmField/interfaceCompanion.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +JvmFieldInInterface -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmField/publicField.kt b/compiler/testData/codegen/box/jvmField/publicField.kt index 8fd9fcb4110..44a114205b3 100644 --- a/compiler/testData/codegen/box/jvmField/publicField.kt +++ b/compiler/testData/codegen/box/jvmField/publicField.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmStatic/jvmNameForAccessor.kt b/compiler/testData/codegen/box/jvmStatic/jvmNameForAccessor.kt index 53af3dab897..01e8f40ff0c 100644 --- a/compiler/testData/codegen/box/jvmStatic/jvmNameForAccessor.kt +++ b/compiler/testData/codegen/box/jvmStatic/jvmNameForAccessor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: tt.kt diff --git a/compiler/testData/codegen/box/objects/classCompanion.kt b/compiler/testData/codegen/box/objects/classCompanion.kt index f8a59859f33..66d6d588238 100644 --- a/compiler/testData/codegen/box/objects/classCompanion.kt +++ b/compiler/testData/codegen/box/objects/classCompanion.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var result = "" class A { diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withCompanionObjectBase.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withCompanionObjectBase.kt index 025123b2027..3de86de9d63 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withCompanionObjectBase.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withCompanionObjectBase.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField -// IGNORE_BACKEND_FIR: JVM_IR // FILE: withCompanionObjectBase.kt import b.* diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withMultipleNestedCompanionObjectBases.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withMultipleNestedCompanionObjectBases.kt index 36b6b3b0999..268cc6a3f2a 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withMultipleNestedCompanionObjectBases.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/multipleCompanionsWithAccessors/withMultipleNestedCompanionObjectBases.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField -// IGNORE_BACKEND_FIR: JVM_IR // FILE: withCompanionObjectBase.kt import b.* diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/doubleCompanionObject.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/doubleCompanionObject.kt index b516e10d299..d6493b95bcb 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/doubleCompanionObject.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/doubleCompanionObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun assertEquals(a: T, b: T) { if (a != b) throw AssertionError("$a != $b") } diff --git a/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/floatCompanionObject.kt b/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/floatCompanionObject.kt index 4c1d40502b2..bb2f5c2d3c3 100644 --- a/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/floatCompanionObject.kt +++ b/compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/floatCompanionObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun assertEquals(a: T, b: T) { if (a != b) throw AssertionError("$a != $b") } diff --git a/compiler/testData/codegen/box/objects/initializationOrder.kt b/compiler/testData/codegen/box/objects/initializationOrder.kt index 20b8580d57e..2281132636b 100644 --- a/compiler/testData/codegen/box/objects/initializationOrder.kt +++ b/compiler/testData/codegen/box/objects/initializationOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var result = "OK" class A { diff --git a/compiler/testData/codegen/box/objects/interfaceCompanion.kt b/compiler/testData/codegen/box/objects/interfaceCompanion.kt index bd235e8939a..033b0d350be 100644 --- a/compiler/testData/codegen/box/objects/interfaceCompanion.kt +++ b/compiler/testData/codegen/box/objects/interfaceCompanion.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // Inside of the companion we have to access the instance through the local Companion field, // not by indirection through the Companion field of the enclosing class. // Class initialization might not have finished yet. diff --git a/compiler/testData/codegen/box/objects/kt535.kt b/compiler/testData/codegen/box/objects/kt535.kt index fae3f0d2a2f..6e78770697c 100644 --- a/compiler/testData/codegen/box/objects/kt535.kt +++ b/compiler/testData/codegen/box/objects/kt535.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS, NATIVE diff --git a/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt b/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt index 0628b4b822e..892e82811a1 100644 --- a/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt +++ b/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Test { companion object { fun ok() = "OK" diff --git a/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt b/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt index f6afcd28528..ff1e7b7f631 100644 --- a/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt +++ b/compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class Base(val fn: () -> String) class Host { diff --git a/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt b/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt index eba76b816dd..faccd52f1a4 100644 --- a/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt +++ b/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface Test { companion object { fun ok() = "OK" diff --git a/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt b/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt index 4f89c40771b..a6e6f034c26 100644 --- a/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt +++ b/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class Base(val fn: () -> String) interface Host { diff --git a/compiler/testData/codegen/box/primitiveTypes/conversions.kt b/compiler/testData/codegen/box/primitiveTypes/conversions.kt index 39f0f46b04e..a8521d51a0a 100644 --- a/compiler/testData/codegen/box/primitiveTypes/conversions.kt +++ b/compiler/testData/codegen/box/primitiveTypes/conversions.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/codegen/box/privateConstructors/captured.kt b/compiler/testData/codegen/box/privateConstructors/captured.kt index 6df94ce0ca9..83b38054d77 100644 --- a/compiler/testData/codegen/box/privateConstructors/captured.kt +++ b/compiler/testData/codegen/box/privateConstructors/captured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR public open class Outer private constructor(val s: String) { companion object { diff --git a/compiler/testData/codegen/box/privateConstructors/companion.kt b/compiler/testData/codegen/box/privateConstructors/companion.kt index d73e32abf27..482c81233a4 100644 --- a/compiler/testData/codegen/box/privateConstructors/companion.kt +++ b/compiler/testData/codegen/box/privateConstructors/companion.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // See also KT-6299 public open class Outer private constructor() { companion object { diff --git a/compiler/testData/codegen/box/privateConstructors/inline.kt b/compiler/testData/codegen/box/privateConstructors/inline.kt index 1864ebebac2..9b80c07d05a 100644 --- a/compiler/testData/codegen/box/privateConstructors/inline.kt +++ b/compiler/testData/codegen/box/privateConstructors/inline.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // See also KT-6299 public open class Outer private constructor() { companion object { diff --git a/compiler/testData/codegen/box/privateConstructors/kt4860.kt b/compiler/testData/codegen/box/privateConstructors/kt4860.kt index e4b29e1241f..8b63d2b415f 100644 --- a/compiler/testData/codegen/box/privateConstructors/kt4860.kt +++ b/compiler/testData/codegen/box/privateConstructors/kt4860.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class A private constructor() { companion object : A() { } diff --git a/compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt b/compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt index 1514619bbcd..4e4f60b9df7 100644 --- a/compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt +++ b/compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class My { companion object { val my: String = "O" diff --git a/compiler/testData/codegen/box/properties/companionObjectAccessor.kt b/compiler/testData/codegen/box/properties/companionObjectAccessor.kt index d296bfb748b..4aee6060976 100644 --- a/compiler/testData/codegen/box/properties/companionObjectAccessor.kt +++ b/compiler/testData/codegen/box/properties/companionObjectAccessor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FILE: J.java diff --git a/compiler/testData/codegen/box/properties/companionPrivateField.kt b/compiler/testData/codegen/box/properties/companionPrivateField.kt index 57d719d1605..7a4b94e7aaa 100644 --- a/compiler/testData/codegen/box/properties/companionPrivateField.kt +++ b/compiler/testData/codegen/box/properties/companionPrivateField.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class My { companion object { private val my: String = "O" diff --git a/compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt b/compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt index 24eb6133d65..7219fcd4d3d 100644 --- a/compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt +++ b/compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class My { companion object { private val my: String = "O" diff --git a/compiler/testData/codegen/box/properties/const/nonConstValsAreProperlyInitialized.kt b/compiler/testData/codegen/box/properties/const/nonConstValsAreProperlyInitialized.kt index fe31743dd2e..a375126f5c4 100644 --- a/compiler/testData/codegen/box/properties/const/nonConstValsAreProperlyInitialized.kt +++ b/compiler/testData/codegen/box/properties/const/nonConstValsAreProperlyInitialized.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +NoConstantValueAttributeForNonConstVals +JvmFieldInInterface -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/properties/kt10729.kt b/compiler/testData/codegen/box/properties/kt10729.kt index f86d4bec960..9b0db522f25 100644 --- a/compiler/testData/codegen/box/properties/kt10729.kt +++ b/compiler/testData/codegen/box/properties/kt10729.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class IntentionsBundle { companion object { fun message(key: String): String { diff --git a/compiler/testData/codegen/box/properties/kt1482_2279.kt b/compiler/testData/codegen/box/properties/kt1482_2279.kt index e15487945b6..cabe5d8ecd3 100644 --- a/compiler/testData/codegen/box/properties/kt1482_2279.kt +++ b/compiler/testData/codegen/box/properties/kt1482_2279.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME package test diff --git a/compiler/testData/codegen/box/properties/kt4140.kt b/compiler/testData/codegen/box/properties/kt4140.kt index ab175ddaaa6..55c964df5b8 100644 --- a/compiler/testData/codegen/box/properties/kt4140.kt +++ b/compiler/testData/codegen/box/properties/kt4140.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class TestObject() { companion object { diff --git a/compiler/testData/codegen/box/properties/kt4252_2.kt b/compiler/testData/codegen/box/properties/kt4252_2.kt index 331e4e36ae0..c86578a72ce 100644 --- a/compiler/testData/codegen/box/properties/kt4252_2.kt +++ b/compiler/testData/codegen/box/properties/kt4252_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Foo() { companion object { val bar = "OK"; diff --git a/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt b/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt index 2a7587aebf3..bcfa741a789 100644 --- a/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt +++ b/compiler/testData/codegen/box/properties/lateinit/accessorExceptionPublic.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR public class A { fun getFromClass(): Boolean { try { diff --git a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/companionObjectField.kt b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/companionObjectField.kt index eaf2d4ea927..abda42f1bed 100644 --- a/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/companionObjectField.kt +++ b/compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/companionObjectField.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME class Class { diff --git a/compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt b/compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt index a14a786a6b4..234c068b4b0 100644 --- a/compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt +++ b/compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt b/compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt index cf57e23534f..de03a9d4357 100644 --- a/compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt +++ b/compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt b/compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt index c3cca828da1..a0683dabcc1 100644 --- a/compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt +++ b/compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt b/compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt index 61160d660e0..fb95e90b88b 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt b/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt index 000b71ff5e4..23b22619db8 100644 --- a/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt +++ b/compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/regressions/kt2318.kt b/compiler/testData/codegen/box/regressions/kt2318.kt index 675f600d732..66e6ea2190a 100644 --- a/compiler/testData/codegen/box/regressions/kt2318.kt +++ b/compiler/testData/codegen/box/regressions/kt2318.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt b/compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt index d7902cce605..3b3559b2895 100644 --- a/compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt +++ b/compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Foo { companion object { val bar: String diff --git a/compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt b/compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt index d2c2c59b651..2ab591a3f58 100644 --- a/compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt +++ b/compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class Bar(val prop: String) class Foo { companion object : Bar("OK") { diff --git a/compiler/testData/codegen/box/statics/kt8089.kt b/compiler/testData/codegen/box/statics/kt8089.kt index 10ded0838dd..2fee361d80d 100644 --- a/compiler/testData/codegen/box/statics/kt8089.kt +++ b/compiler/testData/codegen/box/statics/kt8089.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class C { companion object { private val s: String diff --git a/compiler/testData/ir/irText/expressions/values.fir.txt b/compiler/testData/ir/irText/expressions/values.fir.txt index 806b247568b..929952bc6b8 100644 --- a/compiler/testData/ir/irText/expressions/values.fir.txt +++ b/compiler/testData/ir/irText/expressions/values.fir.txt @@ -129,4 +129,4 @@ FILE fqName: fileName:/values.kt FUN name:test4 visibility:public modality:FINAL <> () returnType:.Z.Companion BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4 (): .Z.Companion declared in ' - GET_OBJECT 'CLASS CLASS name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z.Companion + GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=.Z.Companion diff --git a/compiler/testData/ir/irText/stubs/constFromBuiltins.fir.txt b/compiler/testData/ir/irText/stubs/constFromBuiltins.fir.txt index 449a8ed2c5e..65321722b82 100644 --- a/compiler/testData/ir/irText/stubs/constFromBuiltins.fir.txt +++ b/compiler/testData/ir/irText/stubs/constFromBuiltins.fir.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/constFromBuiltins.kt FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.Int visibility:private [final,static] EXPRESSION_BODY CALL 'public final fun (): kotlin.Int declared in kotlin.Int.Companion' type=kotlin.Int origin=GET_PROPERTY - $this: GET_OBJECT 'CLASS CLASS name:Int modality:FINAL visibility:public superTypes:[kotlin.Number; kotlin.Comparable]' type=kotlin.Int.Companion + $this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=kotlin.Int.Companion FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val] BLOCK_BODY