diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt b/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt index 2b42d332e01..589365ff004 100644 --- a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt +++ b/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt @@ -496,7 +496,7 @@ class DeclarationsConverter( } superTypeRefs.ifEmpty { superTypeRefs += implicitAnyType } - val delegatedType = delegatedSuperTypeRef ?: implicitAnyType + val delegatedSuperType = delegatedSuperTypeRef ?: implicitAnyType return withChildClassName(ANONYMOUS_OBJECT_NAME) { buildAnonymousObject { @@ -505,16 +505,17 @@ class DeclarationsConverter( classKind = ClassKind.OBJECT scopeProvider = baseScopeProvider symbol = FirAnonymousObjectSymbol() + val delegatedSelfType = objectLiteral.toDelegatedSelfType(this) annotations += modifiers.annotations this.superTypeRefs += superTypeRefs - typeRef = superTypeRefs.first() + typeRef = delegatedSelfType val classWrapper = ClassWrapper( SpecialNames.NO_NAME_PROVIDED, modifiers, ClassKind.OBJECT, hasPrimaryConstructor = false, hasSecondaryConstructor = classBody.getChildNodesByType(SECONDARY_CONSTRUCTOR).isNotEmpty(), hasDefaultConstructor = false, - delegatedSelfTypeRef = delegatedType, - delegatedSuperTypeRef = delegatedType, + delegatedSelfTypeRef = delegatedSelfType, + delegatedSuperTypeRef = delegatedSuperType, superTypeCallEntry = superTypeCallEntry ) //parse primary constructor diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt index 27c2e538290..1b58a041320 100644 --- a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt +++ b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt @@ -15,10 +15,7 @@ import org.jetbrains.kotlin.fir.declarations.FirConstructor import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.FirTypeParameter import org.jetbrains.kotlin.fir.declarations.addDeclaration -import org.jetbrains.kotlin.fir.declarations.builder.AbstractFirRegularClassBuilder -import org.jetbrains.kotlin.fir.declarations.builder.buildErrorFunction -import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunction -import org.jetbrains.kotlin.fir.declarations.builder.buildValueParameter +import org.jetbrains.kotlin.fir.declarations.builder.* import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind import org.jetbrains.kotlin.fir.diagnostics.FirSimpleDiagnostic @@ -150,6 +147,13 @@ abstract class BaseFirBuilder(val baseSession: FirSession, val context: Conte } } + fun T?.toDelegatedSelfType(firObject: FirAnonymousObjectBuilder): FirResolvedTypeRef { + return buildResolvedTypeRef { + source = this@toDelegatedSelfType?.toFirSourceElement() + type = ConeClassLikeTypeImpl(firObject.symbol.toLookupTag(), emptyArray(), false) + } + } + fun typeParametersFromSelfType(delegatedSelfTypeRef: FirTypeRef): List { return delegatedSelfTypeRef.coneTypeSafe() ?.typeArguments diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index b807b43eebc..387bc562438 100644 --- a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -674,9 +674,10 @@ class RawFirBuilder( classKind = ClassKind.OBJECT scopeProvider = baseScopeProvider symbol = FirAnonymousObjectSymbol() + val delegatedSelfType = objectDeclaration.toDelegatedSelfType(this) objectDeclaration.extractAnnotationsTo(this) - objectDeclaration.extractSuperTypeListEntriesTo(this, null, null, ClassKind.CLASS) - typeRef = superTypeRefs.first() // TODO + objectDeclaration.extractSuperTypeListEntriesTo(this, delegatedSelfType, null, ClassKind.CLASS) + typeRef = delegatedSelfType for (declaration in objectDeclaration.declarations) { declarations += declaration.toFirDeclaration( diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.txt b/compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.txt index c34a0f3148f..a5b0e3c9215 100644 --- a/compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.txt +++ b/compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.txt @@ -20,7 +20,7 @@ FILE: locals.kt } lval code: = object : Any { - private constructor(): Any { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt b/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt index 117ac2fefd0..87d620066f1 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt @@ -30,7 +30,7 @@ FILE: CallBasedInExpressionGenerator.kt private final fun gen(argument: R|ERROR CLASS: Symbol not found, for `StackValue`|): R|ERROR CLASS: Symbol not found, for `BranchedValue`| { ^gen object : R|ERROR CLASS: Symbol not found, for `BranchedValue`| { - private constructor(): R|ERROR CLASS: Symbol not found, for `BranchedValue`| { + private constructor(): R|anonymous| { super(R|/argument|, Null(null), R|/argument|.#, #.#) } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localImplicitBodies.txt b/compiler/fir/resolve/testData/resolve/expresssions/localImplicitBodies.txt index 93063ad51f6..234040302f6 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localImplicitBodies.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localImplicitBodies.txt @@ -1,7 +1,7 @@ FILE: localImplicitBodies.kt public final fun foo(): R|kotlin/Unit| { lval x: R|anonymous| = object : R|kotlin/Any| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt b/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt index e03d6bc938c..86ebb32cf06 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt @@ -3,7 +3,7 @@ FILE: localInnerClass.kt } public final fun bar(): R|kotlin/Unit| { object : R|Foo| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localObjects.txt b/compiler/fir/resolve/testData/resolve/expresssions/localObjects.txt index 6a7f50b8c3b..ba918a5f207 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localObjects.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localObjects.txt @@ -21,7 +21,7 @@ FILE: localObjects.kt public final fun test(): R|kotlin/Unit| { Q|A|.R|/A.x| lval b: R|anonymous| = object : R|Foo| { - private constructor(): R|Foo| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localScopes.txt b/compiler/fir/resolve/testData/resolve/expresssions/localScopes.txt index 277b93cfa92..f4bf2adc92d 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localScopes.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localScopes.txt @@ -23,7 +23,7 @@ FILE: localScopes.kt R|/base|.R|/BaseLocal.baz|() R|/base|.R|/Bar.foo|() lval anonymous: R|anonymous| = object : R|Bar| { - private constructor(): R|Bar| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt b/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt index 30a972a20e5..78fd96a28ed 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt @@ -1,7 +1,7 @@ FILE: foo.kt public final fun foo(): R|kotlin/Boolean| { object : R|Node| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/outerMemberAccesses.txt b/compiler/fir/resolve/testData/resolve/expresssions/outerMemberAccesses.txt index eafb9542bb1..83e12edf6ef 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/outerMemberAccesses.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/outerMemberAccesses.txt @@ -32,7 +32,7 @@ FILE: O.kt public final fun test(): R|kotlin/Unit| { lval x: R|kotlin/Int| = this@R|/O.Derived|.R|/O.Derived.bar| lval o: R|anonymous| = object : R|Wrapper| { - private constructor(): R|Wrapper| { + private constructor(): R|anonymous| { super(this@R|/O.Derived.Some|.R|/O.Derived.Some.z|) } @@ -41,7 +41,7 @@ FILE: O.kt } public final val oo: R|anonymous| = object : R|kotlin/Any| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -61,7 +61,7 @@ FILE: O.kt public final fun test(): R|kotlin/Unit| { lval x: R|kotlin/Int| = this@R|/O.Derived|.R|/O.Derived.bar| lval o: R|anonymous| = object : R|kotlin/Any| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -86,7 +86,7 @@ FILE: O.kt private final fun gen(): R|kotlin/Any| { ^gen object : R|Wrapper| { - private constructor(): R|Wrapper| { + private constructor(): R|anonymous| { super(Boolean(true)) } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/privateObjectLiteral.txt b/compiler/fir/resolve/testData/resolve/expresssions/privateObjectLiteral.txt index 016916f3509..03415b2c4c3 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/privateObjectLiteral.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/privateObjectLiteral.txt @@ -5,7 +5,7 @@ FILE: privateObjectLiteral.kt } private final val x: R|anonymous| = object : R|kotlin/Any| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -21,7 +21,7 @@ FILE: privateObjectLiteral.kt public get(): R|kotlin/Int| internal final val z: R|anonymous| = object : R|kotlin/Any| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/localObject.txt b/compiler/fir/resolve/testData/resolve/localObject.txt index 8fdbd2ffe3b..3a0e5924820 100644 --- a/compiler/fir/resolve/testData/resolve/localObject.txt +++ b/compiler/fir/resolve/testData/resolve/localObject.txt @@ -9,7 +9,7 @@ FILE: localObject.kt public final fun tesLambda(x: R|kotlin/Int|): R|kotlin/Int| { ^tesLambda R|/run|( = run@fun (): R|kotlin/Int| { lval obj: R|anonymous| = object : R|Foo| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -35,7 +35,7 @@ FILE: localObject.kt public get(): R|kotlin/Int| public set(value: R|kotlin/Int|): R|kotlin/Unit| { lval obj: R|anonymous| = object : R|Foo| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -51,7 +51,7 @@ FILE: localObject.kt public final val y: R|kotlin/Int| public get(): R|kotlin/Int| { lval obj: R|anonymous| = object : R|Foo| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -66,7 +66,7 @@ FILE: localObject.kt public final val z: R|kotlin/Int| = this@R|/TestProperty|.R|kotlin/run|( = run@fun R|TestProperty|.(): R|kotlin/Int| { lval obj: R|anonymous| = object : R|Foo| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolve/objectInnerClass.txt b/compiler/fir/resolve/testData/resolve/objectInnerClass.txt index 87f73fb8070..76f87edec84 100644 --- a/compiler/fir/resolve/testData/resolve/objectInnerClass.txt +++ b/compiler/fir/resolve/testData/resolve/objectInnerClass.txt @@ -1,6 +1,6 @@ FILE: objectInnerClass.kt public final val case1: R|anonymous| = object : R|A| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } @@ -68,7 +68,7 @@ FILE: objectInnerClass.kt } public final val x: R|anonymous| = object : R|Case2.Base| { - private constructor(): R|Case2.Base| { + private constructor(): R|anonymous| { super(R|/B.B|()) } @@ -125,7 +125,7 @@ FILE: objectInnerClass.kt } public final val x: R|anonymous| = object : R|A| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolveWithStdlib/delegates/anonymousInDelegate.txt b/compiler/fir/resolve/testData/resolveWithStdlib/delegates/anonymousInDelegate.txt index 099ac7ed7e9..d6cb9147079 100644 --- a/compiler/fir/resolve/testData/resolveWithStdlib/delegates/anonymousInDelegate.txt +++ b/compiler/fir/resolve/testData/resolveWithStdlib/delegates/anonymousInDelegate.txt @@ -5,7 +5,7 @@ FILE: anonymousInDelegate.kt } public final val x: R|kotlin/Int|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/Int| { lval foo: R|anonymous| = object : R|Foo| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.txt b/compiler/fir/resolve/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.txt index 4434aad01eb..b4978726f32 100644 --- a/compiler/fir/resolve/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.txt +++ b/compiler/fir/resolve/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.txt @@ -24,7 +24,7 @@ FILE: delegateWithAnonymousObject.kt public final var issueListView: R|IssueListView|by this@R|/IssuesListUserProfile|.R|/delegate|( = delegate@fun (): R|kotlin/properties/ReadWriteProperty| { ^ object : R|kotlin/properties/ReadWriteProperty| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/fir/resolve/testData/resolveWithStdlib/problems.txt b/compiler/fir/resolve/testData/resolveWithStdlib/problems.txt index d3d387ad5a3..25f80329371 100644 --- a/compiler/fir/resolve/testData/resolveWithStdlib/problems.txt +++ b/compiler/fir/resolve/testData/resolveWithStdlib/problems.txt @@ -2,7 +2,7 @@ FILE: problems.kt public final val sb: R|java/lang/StringBuilder| = R|java/lang/StringBuilder.StringBuilder|() public get(): R|java/lang/StringBuilder| public final val o: R|anonymous| = object : R|kotlin/Any| { - private constructor(): R|kotlin/Any| { + private constructor(): R|anonymous| { super() } diff --git a/compiler/testData/codegen/box/arrays/kt17134.kt b/compiler/testData/codegen/box/arrays/kt17134.kt index 22cdb8c3bac..5f6f07dbff5 100644 --- a/compiler/testData/codegen/box/arrays/kt17134.kt +++ b/compiler/testData/codegen/box/arrays/kt17134.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //WITH_RUNTIME // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/closures/kt19389.kt b/compiler/testData/codegen/box/closures/kt19389.kt index ef1c751132a..7b8a1fc687b 100644 --- a/compiler/testData/codegen/box/closures/kt19389.kt +++ b/compiler/testData/codegen/box/closures/kt19389.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR public fun myWith(receiver: T, block: T.() -> R): R { return receiver.block() } diff --git a/compiler/testData/codegen/box/closures/kt19389_set.kt b/compiler/testData/codegen/box/closures/kt19389_set.kt index bff43cbaa70..104d35ef972 100644 --- a/compiler/testData/codegen/box/closures/kt19389_set.kt +++ b/compiler/testData/codegen/box/closures/kt19389_set.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var result = "fail" public fun myWith(receiver: T, block: T.() -> R): R { diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/kt30517.kt b/compiler/testData/codegen/box/defaultArguments/constructor/kt30517.kt index d61dbc529e3..cbc829fe926 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/kt30517.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/kt30517.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class Foo(val args: String){ constructor(arg: Any = 1) : this(arg.toString()) { diff --git a/compiler/testData/codegen/box/defaultArguments/constructor/objectExpressionDelegatingToSecondaryConstructor.kt b/compiler/testData/codegen/box/defaultArguments/constructor/objectExpressionDelegatingToSecondaryConstructor.kt index 68d561947e4..89ef149e94a 100644 --- a/compiler/testData/codegen/box/defaultArguments/constructor/objectExpressionDelegatingToSecondaryConstructor.kt +++ b/compiler/testData/codegen/box/defaultArguments/constructor/objectExpressionDelegatingToSecondaryConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class O(val value: String) { constructor(o: Char = 'O') : this("$o") diff --git a/compiler/testData/codegen/box/delegatedProperty/local/kt23117.kt b/compiler/testData/codegen/box/delegatedProperty/local/kt23117.kt index d3190a4beb1..21d7489f2e2 100644 --- a/compiler/testData/codegen/box/delegatedProperty/local/kt23117.kt +++ b/compiler/testData/codegen/box/delegatedProperty/local/kt23117.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KJS_WITH_FULL_RUNTIME // WITH_RUNTIME import kotlin.properties.Delegates.notNull diff --git a/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt b/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt index bd9cb84afd2..298b0ec9162 100644 --- a/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt +++ b/compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // KT-3581 open class A(val result: String = "OK") { diff --git a/compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt b/compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt index 30df81da284..2b5c62666e6 100644 --- a/compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt +++ b/compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A( val a: String = { open class B() { diff --git a/compiler/testData/codegen/box/localClasses/object.kt b/compiler/testData/codegen/box/localClasses/object.kt index 00701503b66..a96a9237f68 100644 --- a/compiler/testData/codegen/box/localClasses/object.kt +++ b/compiler/testData/codegen/box/localClasses/object.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { val k = object { val ok = "OK" diff --git a/compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt b/compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt index 075263ccc6f..9e194386e6a 100644 --- a/compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt +++ b/compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { operator fun component1() = 1 operator fun component2() = 2 diff --git a/compiler/testData/codegen/box/objects/kt11117.kt b/compiler/testData/codegen/box/objects/kt11117.kt index e751be9c188..439f80a6723 100644 --- a/compiler/testData/codegen/box/objects/kt11117.kt +++ b/compiler/testData/codegen/box/objects/kt11117.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A(val value: String) fun A.test(): String { diff --git a/compiler/testData/codegen/box/objects/kt1136.kt b/compiler/testData/codegen/box/objects/kt1136.kt index 93b56bdb5a2..9caf5855971 100644 --- a/compiler/testData/codegen/box/objects/kt1136.kt +++ b/compiler/testData/codegen/box/objects/kt1136.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM public object SomeObject { diff --git a/compiler/testData/codegen/box/objects/kt2719.kt b/compiler/testData/codegen/box/objects/kt2719.kt index b94253ac1d0..908dbb3a1be 100644 --- a/compiler/testData/codegen/box/objects/kt2719.kt +++ b/compiler/testData/codegen/box/objects/kt2719.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Clazz { companion object { val a = object { diff --git a/compiler/testData/codegen/box/operatorConventions/kt14201_2.kt b/compiler/testData/codegen/box/operatorConventions/kt14201_2.kt index 3461a4eb6fb..b95b82d9172 100644 --- a/compiler/testData/codegen/box/operatorConventions/kt14201_2.kt +++ b/compiler/testData/codegen/box/operatorConventions/kt14201_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { val z: String = "OK" } diff --git a/compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt b/compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt index 20f515bf4ee..a33fcca3c74 100644 --- a/compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt +++ b/compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class Your { abstract val your: String diff --git a/compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt b/compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt index 435447a2931..af1660a58da 100644 --- a/compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt +++ b/compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class Your { abstract val your: String diff --git a/compiler/testData/codegen/box/properties/fieldInsideNested.kt b/compiler/testData/codegen/box/properties/fieldInsideNested.kt index 50ac361818e..cb49c6b46c7 100644 --- a/compiler/testData/codegen/box/properties/fieldInsideNested.kt +++ b/compiler/testData/codegen/box/properties/fieldInsideNested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class Your { abstract val your: String diff --git a/compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt b/compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt index 75e1d92859c..d4d91244bc0 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt b/compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt index d897aaf6c8d..bcd8f0773c2 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reified/anonymousObject.kt b/compiler/testData/codegen/box/reified/anonymousObject.kt index 2a403196a96..c8323753642 100644 --- a/compiler/testData/codegen/box/reified/anonymousObject.kt +++ b/compiler/testData/codegen/box/reified/anonymousObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reified/nestedReified.kt b/compiler/testData/codegen/box/reified/nestedReified.kt index a06205b51ea..7bcd268f3c8 100644 --- a/compiler/testData/codegen/box/reified/nestedReified.kt +++ b/compiler/testData/codegen/box/reified/nestedReified.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/synchronized/sync.kt b/compiler/testData/codegen/box/synchronized/sync.kt index f9ee66237f8..e48f6181edb 100644 --- a/compiler/testData/codegen/box/synchronized/sync.kt +++ b/compiler/testData/codegen/box/synchronized/sync.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt b/compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt index 5e8f4dc20e6..eab3abf7d1d 100644 --- a/compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt +++ b/compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class LockFreeLinkedListNode(val s: String) private class SendBuffered(s: String) : LockFreeLinkedListNode(s) open class AddLastDesc2(val node: T) diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt index 01d25f38c50..22b4e1710f1 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt @@ -106,7 +106,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK type=.otherImpl. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IOther] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.otherImpl. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.otherImpl. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IOther]' diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt index 0edd7e12fe3..102ca6d605d 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.fir.txt @@ -58,7 +58,7 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt BLOCK type=.B.. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B.. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.B.. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt index c5b9bd4e0d2..b5c17b04b0f 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.txt @@ -22,7 +22,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt BLOCK type=.test1. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test1. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.test1. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any]' @@ -38,7 +38,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt BLOCK type=.test2. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IFoo] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test2. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.test2. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.IFoo]' @@ -89,7 +89,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt BLOCK type=.Outer.test3. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.test3. - CONSTRUCTOR visibility:private <> () returnType:.Outer.Inner [primary] + CONSTRUCTOR visibility:private <> () returnType:.Outer.test3. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Outer.Inner' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Outer.Inner]' @@ -119,7 +119,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt BLOCK type=.test4. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test4. - CONSTRUCTOR visibility:private <> () returnType:.Outer.Inner [primary] + CONSTRUCTOR visibility:private <> () returnType:.test4. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in .Outer.Inner' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Outer.Inner]' diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt index 400f6118306..c4ddb6ca0c4 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt @@ -69,7 +69,7 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt BLOCK type=.MyEnum.Z.anObject. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.Z.anObject. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.MyEnum.Z.anObject. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt index b67d244f34e..18246486e77 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt @@ -61,7 +61,7 @@ FILE fqName: fileName:/partialSam.kt BLOCK type=.fsi. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Fn] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.fsi. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.fsi. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Fn]' @@ -85,7 +85,7 @@ FILE fqName: fileName:/partialSam.kt BLOCK type=.fis. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Fn] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.fis. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.fis. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Fn]' diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt index 3ba32372d9f..ae99a186c41 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt @@ -75,7 +75,7 @@ FILE fqName: fileName:/multipleThisReferences.kt BLOCK type=.Host.test. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Host.test. - CONSTRUCTOR visibility:private <> () returnType:.Outer.Inner [primary] + CONSTRUCTOR visibility:private <> () returnType:.Host.test. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (x: kotlin.Int) [primary] declared in .Outer.Inner' x: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/objectReference.fir.txt b/compiler/testData/ir/irText/expressions/objectReference.fir.txt index 0f9b39557ee..df1384b6caf 100644 --- a/compiler/testData/ir/irText/expressions/objectReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReference.fir.txt @@ -113,7 +113,7 @@ FILE fqName: fileName:/objectReference.kt BLOCK type=.Z.anObject. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z.anObject. - CONSTRUCTOR visibility:private <> () returnType:kotlin.Any [primary] + CONSTRUCTOR visibility:private <> () returnType:.Z.anObject. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[kotlin.Any]' diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt index d733ac164a9..8b432718c63 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt @@ -69,7 +69,7 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt BLOCK type=.test. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.Outer.Inner] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test. - CONSTRUCTOR visibility:private <> () returnType:.Outer.Inner [primary] + CONSTRUCTOR visibility:private <> () returnType:.test. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (y: kotlin.Int) [primary] declared in .Outer.Inner' y: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt index 40ddb9c4dd6..3788e3c80d0 100644 --- a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt +++ b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt @@ -6,16 +6,16 @@ FILE fqName: fileName:/thisReferenceBeforeClassDeclared.kt BLOCK type=.test. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.WithCompanion] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test. - CONSTRUCTOR visibility:private <> () returnType:.WithCompanion [primary] + CONSTRUCTOR visibility:private <> () returnType:.test. [primary] BLOCK_BODY - ERROR_CALL 'Cannot find delegated constructor call' type=.WithCompanion + ERROR_CALL 'Cannot find delegated constructor call' type=.test. INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[.WithCompanion]' CONSTRUCTOR_CALL 'private constructor () [primary] declared in .test.' type=.test. origin=null VAR name:test2 type:.test. [val] BLOCK type=.test. origin=OBJECT_LITERAL CLASS CLASS name: modality:FINAL visibility:local superTypes:[.WithCompanion] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.test. - CONSTRUCTOR visibility:private <> () returnType:.WithCompanion [primary] + CONSTRUCTOR visibility:private <> () returnType:.test. [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (a: .WithCompanion.Companion) [primary] declared in .WithCompanion' a: ERROR_CALL 'Unresolved reference: #' type=IrErrorType