diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt index 1df48a17824..db9fec9002f 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt @@ -20,7 +20,6 @@ import org.jetbrains.kotlin.fir.types.ConeNullability import org.jetbrains.kotlin.fir.types.withNullability import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.util.OperatorNameConventions -import org.jetbrains.kotlin.utils.addToStdlib.cast interface TowerScopeLevel { @@ -190,8 +189,11 @@ class ScopeTowerLevel( TowerScopeLevel.Token.Properties -> scope.processPropertiesByName(name) { candidate -> empty = false if (candidate.hasConsistentReceivers(extensionReceiver)) { + val dispatchReceiverValue = + if (candidate !is FirBackingFieldSymbol) null + else bodyResolveComponents.implicitReceiverStack.lastDispatchReceiver() processor.consumeCandidate( - candidate as T, dispatchReceiverValue = null, + candidate as T, dispatchReceiverValue, implicitExtensionReceiverValue = extensionReceiver as? ImplicitReceiverValue<*> ) } diff --git a/compiler/fir/resolve/testData/resolve/localObject.txt b/compiler/fir/resolve/testData/resolve/localObject.txt index 3a0e5924820..184530e800a 100644 --- a/compiler/fir/resolve/testData/resolve/localObject.txt +++ b/compiler/fir/resolve/testData/resolve/localObject.txt @@ -45,7 +45,7 @@ FILE: localObject.kt } - F|/TestProperty.x| = R|/value| + this@R|/TestProperty|.F|/TestProperty.x| = R|/value| } public final val y: R|kotlin/Int| diff --git a/compiler/testData/codegen/box/classes/propertyDelegation.kt b/compiler/testData/codegen/box/classes/propertyDelegation.kt index 2b1b644ec6f..59720282936 100644 --- a/compiler/testData/codegen/box/classes/propertyDelegation.kt +++ b/compiler/testData/codegen/box/classes/propertyDelegation.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class Base() { val plain = 239 public val read : Int diff --git a/compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt b/compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt index fb67d233126..0717061a9b4 100644 --- a/compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt +++ b/compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class X(var value: Long) operator fun X.inc(): X { diff --git a/compiler/testData/codegen/box/properties/fieldInClass.kt b/compiler/testData/codegen/box/properties/fieldInClass.kt index 9e83ac85e74..37ef0a06a9a 100644 --- a/compiler/testData/codegen/box/properties/fieldInClass.kt +++ b/compiler/testData/codegen/box/properties/fieldInClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class My { val my: String = "O" get() = field + "K" diff --git a/compiler/testData/codegen/box/properties/kt10715.kt b/compiler/testData/codegen/box/properties/kt10715.kt index 6881aa28455..7449c1b5bfa 100644 --- a/compiler/testData/codegen/box/properties/kt10715.kt +++ b/compiler/testData/codegen/box/properties/kt10715.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { var a = Base() diff --git a/compiler/testData/ir/irText/classes/initVar.fir.txt b/compiler/testData/ir/irText/classes/initVar.fir.txt deleted file mode 100644 index caf8fc507f7..00000000000 --- a/compiler/testData/ir/irText/classes/initVar.fir.txt +++ /dev/null @@ -1,234 +0,0 @@ -FILE fqName: fileName:/initVar.kt - CLASS CLASS name:TestInitVarFromParameter modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitVarFromParameter - CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.TestInitVarFromParameter [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitVarFromParameter modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .TestInitVarFromParameter.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarFromParameter) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarFromParameter - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitVarFromParameter' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitVarFromParameter declared in .TestInitVarFromParameter.' type=.TestInitVarFromParameter origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarFromParameter, :kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarFromParameter - VALUE_PARAMETER name: index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitVarFromParameter declared in .TestInitVarFromParameter.' type=.TestInitVarFromParameter origin=null - value: GET_VAR ': kotlin.Int declared in .TestInitVarFromParameter.' type=kotlin.Int origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:TestInitVarInClass modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitVarInClass - CONSTRUCTOR visibility:public <> () returnType:.TestInitVarInClass [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitVarInClass modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarInClass) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarInClass - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitVarInClass' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitVarInClass declared in .TestInitVarInClass.' type=.TestInitVarInClass origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarInClass, :kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarInClass - VALUE_PARAMETER name: index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitVarInClass declared in .TestInitVarInClass.' type=.TestInitVarInClass origin=null - value: GET_VAR ': kotlin.Int declared in .TestInitVarInClass.' type=kotlin.Int origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:TestInitVarInInitBlock modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitVarInInitBlock - CONSTRUCTOR visibility:public <> () returnType:.TestInitVarInInitBlock [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitVarInInitBlock modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarInInitBlock) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarInInitBlock - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitVarInInitBlock' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitVarInInitBlock declared in .TestInitVarInInitBlock.' type=.TestInitVarInInitBlock origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarInInitBlock, :kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarInInitBlock - VALUE_PARAMETER name: index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitVarInInitBlock declared in .TestInitVarInInitBlock.' type=.TestInitVarInInitBlock origin=null - value: GET_VAR ': kotlin.Int declared in .TestInitVarInInitBlock.' type=kotlin.Int origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .TestInitVarInInitBlock' type=kotlin.Unit origin=EQ - $this: GET_VAR ': .TestInitVarInInitBlock declared in .TestInitVarInInitBlock' type=.TestInitVarInInitBlock origin=null - : CONST Int type=kotlin.Int value=0 - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:TestInitVarWithCustomSetter modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitVarWithCustomSetter - CONSTRUCTOR visibility:public <> () returnType:.TestInitVarWithCustomSetter [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitVarWithCustomSetter modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarWithCustomSetter) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarWithCustomSetter - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitVarWithCustomSetter' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitVarWithCustomSetter declared in .TestInitVarWithCustomSetter.' type=.TestInitVarWithCustomSetter origin=null - FUN name: visibility:public modality:FINAL <> ($this:.TestInitVarWithCustomSetter, value:kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarWithCustomSetter - VALUE_PARAMETER name:value index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ - value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetter.' type=kotlin.Int origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:TestInitVarWithCustomSetterWithExplicitCtor modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitVarWithCustomSetterWithExplicitCtor - PROPERTY name:x visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarWithCustomSetterWithExplicitCtor) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarWithCustomSetterWithExplicitCtor - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitVarWithCustomSetterWithExplicitCtor' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitVarWithCustomSetterWithExplicitCtor declared in .TestInitVarWithCustomSetterWithExplicitCtor.' type=.TestInitVarWithCustomSetterWithExplicitCtor origin=null - FUN name: visibility:public modality:FINAL <> ($this:.TestInitVarWithCustomSetterWithExplicitCtor, value:kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarWithCustomSetterWithExplicitCtor - VALUE_PARAMETER name:value index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ - value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetterWithExplicitCtor.' type=kotlin.Int origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - CALL 'public final fun (value: kotlin.Int): kotlin.Unit declared in .TestInitVarWithCustomSetterWithExplicitCtor' type=kotlin.Unit origin=EQ - $this: GET_VAR ': .TestInitVarWithCustomSetterWithExplicitCtor declared in .TestInitVarWithCustomSetterWithExplicitCtor' type=.TestInitVarWithCustomSetterWithExplicitCtor origin=null - value: CONST Int type=kotlin.Int value=0 - CONSTRUCTOR visibility:public <> () returnType:.TestInitVarWithCustomSetterWithExplicitCtor - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitVarWithCustomSetterWithExplicitCtor modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:TestInitVarWithCustomSetterInCtor modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestInitVarWithCustomSetterInCtor - PROPERTY name:x visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestInitVarWithCustomSetterInCtor) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarWithCustomSetterInCtor - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestInitVarWithCustomSetterInCtor' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestInitVarWithCustomSetterInCtor declared in .TestInitVarWithCustomSetterInCtor.' type=.TestInitVarWithCustomSetterInCtor origin=null - FUN name: visibility:public modality:FINAL <> ($this:.TestInitVarWithCustomSetterInCtor, value:kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var] - $this: VALUE_PARAMETER name: type:.TestInitVarWithCustomSetterInCtor - VALUE_PARAMETER name:value index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ - value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetterInCtor.' type=kotlin.Int origin=null - CONSTRUCTOR visibility:public <> () returnType:.TestInitVarWithCustomSetterInCtor - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitVarWithCustomSetterInCtor modality:FINAL visibility:public superTypes:[kotlin.Any]' - CALL 'public final fun (value: kotlin.Int): kotlin.Unit declared in .TestInitVarWithCustomSetterInCtor' type=kotlin.Unit origin=EQ - $this: GET_VAR ': .TestInitVarWithCustomSetterInCtor declared in .TestInitVarWithCustomSetterInCtor' type=.TestInitVarWithCustomSetterInCtor origin=null - value: CONST Int type=kotlin.Int value=42 - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/classes/initVar.kt b/compiler/testData/ir/irText/classes/initVar.kt index c0fb46476ac..64ee9e72caa 100644 --- a/compiler/testData/ir/irText/classes/initVar.kt +++ b/compiler/testData/ir/irText/classes/initVar.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class TestInitVarFromParameter(var x: Int) class TestInitVarInClass { diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index bb0b96af3b2..893bfca2501 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -59,6 +59,7 @@ FILE fqName: fileName:/classLevelProperties.kt VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:private' type=kotlin.Unit origin=EQ + receiver: GET_VAR ': .C declared in .C.' type=.C origin=null value: GET_VAR 'value: kotlin.Int declared in .C.' type=kotlin.Int origin=null PROPERTY name:test5 visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:private