diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index d8324967275..9b239791d92 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -9,6 +9,7 @@ import com.intellij.psi.PsiCompiledElement import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.symbols.ConeClassifierSymbol +import org.jetbrains.kotlin.fir.symbols.ConeSymbol import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.ir.IrElement @@ -101,24 +102,28 @@ fun ConeClassifierSymbol.toIrSymbol(session: FirSession, declarationStorage: Fir } fun FirReference.toSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbol? { - if (this is FirNamedReference) { - return toSymbol(declarationStorage) + return when (this) { + is FirResolvedCallableReference -> coneSymbol.toSymbol(declarationStorage) + is FirThisReference -> { + when (val ownerSymbol = candidateOwner?.toSymbol(declarationStorage)) { + is IrClassSymbol -> ownerSymbol.owner.thisReceiver?.symbol + is IrFunctionSymbol -> ownerSymbol.owner.extensionReceiverParameter?.symbol + else -> null + } + } + else -> null } - return null } -fun FirNamedReference.toSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbol? { - if (this is FirResolvedCallableReference) { - when (val callableSymbol = this.coneSymbol) { - is FirFunctionSymbol<*> -> return callableSymbol.toFunctionSymbol(declarationStorage) - is FirPropertySymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage) - is FirFieldSymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage) - is FirBackingFieldSymbol -> return callableSymbol.toBackingFieldSymbol(declarationStorage) - is FirDelegateFieldSymbol<*> -> return callableSymbol.toBackingFieldSymbol(declarationStorage) - is FirVariableSymbol<*> -> return callableSymbol.toValueSymbol(declarationStorage) - } - } - return null +private fun ConeSymbol.toSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbol? = when (this) { + is FirClassSymbol -> toClassSymbol(declarationStorage) + is FirFunctionSymbol<*> -> toFunctionSymbol(declarationStorage) + is FirPropertySymbol -> toPropertyOrFieldSymbol(declarationStorage) + is FirFieldSymbol -> toPropertyOrFieldSymbol(declarationStorage) + is FirBackingFieldSymbol -> toBackingFieldSymbol(declarationStorage) + is FirDelegateFieldSymbol<*> -> toBackingFieldSymbol(declarationStorage) + is FirVariableSymbol<*> -> toValueSymbol(declarationStorage) + else -> null } fun FirClassSymbol.toClassSymbol(declarationStorage: Fir2IrDeclarationStorage): IrClassSymbol { 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 1191a3a3c6b..8bf10fdc4c8 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 @@ -765,6 +765,15 @@ internal class Fir2IrVisitor( } this } + is IrFieldExpressionBase -> { + val explicitReceiver = qualifiedAccess.explicitReceiver?.toIrExpression() + if (explicitReceiver != null) { + receiver = explicitReceiver + } else { + // TODO: implicit receiver + } + this + } else -> this } } @@ -823,7 +832,7 @@ internal class Fir2IrVisitor( if (symbol != null && symbol.isBound) { when (symbol) { is IrFieldSymbol -> IrSetFieldImpl( - startOffset, endOffset, symbol, symbol.owner.type + startOffset, endOffset, symbol, unitType ).apply { value = variableAssignment.rValue.toIrExpression() } @@ -832,7 +841,7 @@ internal class Fir2IrVisitor( val backingField = irProperty.backingField if (backingField != null) { IrSetFieldImpl( - startOffset, endOffset, backingField.symbol, backingField.symbol.owner.type + startOffset, endOffset, backingField.symbol, unitType ).apply { value = variableAssignment.rValue.toIrExpression() } @@ -850,7 +859,7 @@ internal class Fir2IrVisitor( } else { generateErrorCallExpression(startOffset, endOffset, calleeReference) } - } + }.applyReceivers(variableAssignment) } override fun visitConstExpression(constExpression: FirConstExpression, data: Any?): IrElement { diff --git a/compiler/testData/ir/irText/classes/enum.fir.txt b/compiler/testData/ir/irText/classes/enum.fir.txt index d609e6df118..478068334f3 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.txt @@ -320,7 +320,7 @@ FILE fqName: fileName:/enum.kt receiver: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2.' type=.TestEnum4.TEST2 origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:public [final]' type=kotlin.Unit origin=null value: CALL 'public final fun (): kotlin.Int declared in .TestEnum4' type=kotlin.Int origin=null FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 diff --git a/compiler/testData/ir/irText/classes/initVal.fir.txt b/compiler/testData/ir/irText/classes/initVal.fir.txt index c0964180444..d7307148cd5 100644 --- a/compiler/testData/ir/irText/classes/initVal.fir.txt +++ b/compiler/testData/ir/irText/classes/initVal.fir.txt @@ -77,7 +77,7 @@ FILE fqName: fileName:/initVal.kt receiver: GET_VAR ': .TestInitValInInitBlock declared in .TestInitValInInitBlock.' type=.TestInitValInInitBlock origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Unit origin=null value: 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 overridden: diff --git a/compiler/testData/ir/irText/classes/initVar.fir.txt b/compiler/testData/ir/irText/classes/initVar.fir.txt index f19304f90c5..ba415b73fa1 100644 --- a/compiler/testData/ir/irText/classes/initVar.fir.txt +++ b/compiler/testData/ir/irText/classes/initVar.fir.txt @@ -101,7 +101,7 @@ FILE fqName: fileName:/initVar.kt value: GET_VAR ': kotlin.Int declared in .TestInitVarInInitBlock.' type=kotlin.Int origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: 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 overridden: @@ -138,7 +138,7 @@ FILE fqName: fileName:/initVar.kt $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:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null 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 overridden: @@ -169,11 +169,11 @@ FILE fqName: fileName:/initVar.kt $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:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetterWithExplicitCtor.' type=kotlin.Int origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=0 CONSTRUCTOR visibility:public <> () returnType:.TestInitVarWithCustomSetterWithExplicitCtor BLOCK_BODY @@ -208,11 +208,11 @@ FILE fqName: fileName:/initVar.kt $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:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetterInCtor.' type=kotlin.Int origin=null CONSTRUCTOR visibility:public <> () returnType:.TestInitVarWithCustomSetterInCtor BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=42 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]' diff --git a/compiler/testData/ir/irText/classes/objectWithInitializers.fir.txt b/compiler/testData/ir/irText/classes/objectWithInitializers.fir.txt index 077578ca5b5..2109fc8a362 100644 --- a/compiler/testData/ir/irText/classes/objectWithInitializers.fir.txt +++ b/compiler/testData/ir/irText/classes/objectWithInitializers.fir.txt @@ -46,7 +46,7 @@ FILE fqName: fileName:/objectWithInitializers.kt receiver: GET_VAR ': .Test declared in .Test.' type=.Test origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]' type=kotlin.Unit origin=null value: CALL 'public final fun (): kotlin.Int declared in .Test' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/classes/primaryConstructor.fir.txt b/compiler/testData/ir/irText/classes/primaryConstructor.fir.txt deleted file mode 100644 index e92205779e8..00000000000 --- a/compiler/testData/ir/irText/classes/primaryConstructor.fir.txt +++ /dev/null @@ -1,132 +0,0 @@ -FILE fqName: fileName:/primaryConstructor.kt - CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 - CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.Int) returnType:.Test1 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - VALUE_PARAMETER name:y index:1 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .Test1.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - PROPERTY name:y visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final] - EXPRESSION_BODY - GET_VAR 'y: kotlin.Int declared in .Test1.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Int - correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test1' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 - 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 - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 - CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.Int) returnType:.Test2 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - VALUE_PARAMETER name:y index:1 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:y visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final] - EXPRESSION_BODY - GET_VAR 'y: kotlin.Int declared in .Test2.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test2) returnType:kotlin.Int - correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] - EXPRESSION_BODY - GET_VAR 'x: kotlin.Int declared in .Test2.' type=kotlin.Int origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test2) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 - 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 - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test3 - CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.Int) returnType:.Test3 [primary] - VALUE_PARAMETER name:x index:0 type:kotlin.Int - VALUE_PARAMETER name:y index:1 type:kotlin.Int - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:y visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final] - EXPRESSION_BODY - GET_VAR 'y: kotlin.Int declared in .Test3.' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Int - correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Test3) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.Test3 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test3' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .Test3 declared in .Test3.' type=.Test3 origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null - value: GET_VAR 'x: kotlin.Int declared in .Test3.' type=kotlin.Int origin=null - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean 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 - 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 - 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/primaryConstructor.kt b/compiler/testData/ir/irText/classes/primaryConstructor.kt index a59485957a4..512b4a8ba73 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructor.kt +++ b/compiler/testData/ir/irText/classes/primaryConstructor.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class Test1(val x: Int, val y: Int) class Test2(x: Int, val y: Int) { diff --git a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.fir.txt b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.fir.txt index e186bb2b5e6..fc78d0c1b53 100644 --- a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.fir.txt +++ b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.fir.txt @@ -61,7 +61,7 @@ FILE fqName: fileName:/secondaryConstructorWithInitializersFromClassBody.k receiver: GET_VAR ': .TestInitBlock declared in .TestInitBlock.' type=.TestInitBlock origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public [final]' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=0 CONSTRUCTOR visibility:public <> () returnType:.TestInitBlock BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt index 39cf9634331..8639ad7e5d4 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt @@ -66,7 +66,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt VALUE_PARAMETER name:kProp index:1 type:kotlin.Any? VALUE_PARAMETER name:newValue index:2 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: GET_VAR 'newValue: kotlin.Int declared in .Cell.setValue' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index 73658efd2c5..e1f5623a91b 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -58,7 +58,7 @@ FILE fqName: fileName:/classLevelProperties.kt $this: VALUE_PARAMETER name: type:.C VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:public' type=kotlin.Unit 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:public @@ -98,7 +98,7 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of [inline] declared in kotlin' type=kotlin.Int origin=null $receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=GET_PROPERTY - thisRef: ERROR_CALL 'Unresolved reference: this#' type=.C + thisRef: GET_VAR ': .C declared in .C' type=.C origin=null property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final] @@ -110,7 +110,7 @@ FILE fqName: fileName:/classLevelProperties.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .C' ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] @@ -118,7 +118,7 @@ FILE fqName: fileName:/classLevelProperties.kt VALUE_PARAMETER name: index:0 type:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=null GET_VAR ': IrErrorType declared in .C.' type=IrErrorType origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt index 115d8e4892a..b624250710c 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt @@ -49,7 +49,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of [inline] declared in kotlin' type=kotlin.Int origin=null $receiver: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=GET_PROPERTY - thisRef: ERROR_CALL 'Unresolved reference: this#' type=.C + thisRef: GET_VAR ': .C declared in .C' type=.C origin=null property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final] @@ -61,7 +61,7 @@ FILE fqName: fileName:/delegatedProperties.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .C' ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C, :IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] @@ -69,7 +69,7 @@ FILE fqName: fileName:/delegatedProperties.kt VALUE_PARAMETER name: index:0 type:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final]' getter='public final fun (): IrErrorType declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=null GET_VAR ': IrErrorType declared in .C.' type=IrErrorType origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/declarations/kt29833.fir.txt b/compiler/testData/ir/irText/declarations/kt29833.fir.txt index aa0ba8a8566..89f537e1d37 100644 --- a/compiler/testData/ir/irText/declarations/kt29833.fir.txt +++ b/compiler/testData/ir/irText/declarations/kt29833.fir.txt @@ -9,6 +9,7 @@ FILE fqName:interop fileName:/Definitions.kt FIELD PROPERTY_BACKING_FIELD name:KT_CONSTANT type:kotlin.String? visibility:public [final] EXPRESSION_BODY GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:CONSTANT type:kotlin.String? visibility:public [final,static]' type=kotlin.String? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:Interface modality:OPEN visibility:public/*package*/ superTypes:[kotlin.Any]' type=kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:interop.Definitions) returnType:kotlin.String? correspondingProperty: PROPERTY name:KT_CONSTANT visibility:public modality:FINAL [const,val] $this: VALUE_PARAMETER name: type:interop.Definitions @@ -20,6 +21,7 @@ FILE fqName:interop fileName:/Definitions.kt FIELD PROPERTY_BACKING_FIELD name:ktValue type:kotlin.String? visibility:public [final] EXPRESSION_BODY GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:CONSTANT type:kotlin.String? visibility:public [final,static]' type=kotlin.String? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:Interface modality:OPEN visibility:public/*package*/ superTypes:[kotlin.Any]' type=kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:interop.Definitions) returnType:kotlin.String? correspondingProperty: PROPERTY name:ktValue visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:interop.Definitions diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt index e01bdb9c120..32c2c13eabb 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/packageLevelProperties.kt correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: GET_VAR 'value: kotlin.Int declared in .' type=kotlin.Int origin=null PROPERTY name:test5 visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:public [static] diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt index aa99860961a..37ae51be392 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt @@ -37,14 +37,14 @@ FILE fqName: fileName:/differentReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String declared in ' CALL 'public final fun (): kotlin.String declared in .MyClass' type=kotlin.String origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=.MyClass + $this: GET_VAR ': .MyClass declared in .provideDelegate' type=.MyClass origin=null FUN name:getValue visibility:public modality:FINAL <> ($receiver:kotlin.String, receiver:kotlin.Any?, p:kotlin.Any) returnType:kotlin.String $receiver: VALUE_PARAMETER name: type:kotlin.String VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? VALUE_PARAMETER name:p index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String declared in ' - ERROR_CALL 'Unresolved reference: this#' type=kotlin.String + GET_VAR ': kotlin.String declared in .getValue' type=kotlin.String origin=null PROPERTY name:testO visibility:public modality:FINAL [delegated,val] FIELD DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.fir.txt index ca561bc2c29..99e572c2950 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.fir.txt @@ -37,14 +37,14 @@ FILE fqName: fileName:/localDifferentReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): kotlin.String declared in ' CALL 'public final fun (): kotlin.String declared in .MyClass' type=kotlin.String origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=.MyClass + $this: GET_VAR ': .MyClass declared in .provideDelegate' type=.MyClass origin=null FUN name:getValue visibility:public modality:FINAL <> ($receiver:kotlin.String, receiver:kotlin.Any?, p:kotlin.Any) returnType:kotlin.String $receiver: VALUE_PARAMETER name: type:kotlin.String VALUE_PARAMETER name:receiver index:0 type:kotlin.Any? VALUE_PARAMETER name:p index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String declared in ' - ERROR_CALL 'Unresolved reference: this#' type=kotlin.String + GET_VAR ': kotlin.String declared in .getValue' type=kotlin.String origin=null FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY VAR name:testO type:kotlin.String [val] diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt index 938ea11b1b5..5497ba36f1f 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt @@ -88,7 +88,7 @@ FILE fqName: fileName:/member.kt CALL 'public final fun provideDelegate (thisRef: kotlin.Any?, property: kotlin.Any?): .Delegate declared in .DelegateProvider' type=.Delegate origin=null $this: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .DelegateProvider' type=.DelegateProvider origin=null value: CONST String type=kotlin.String value="OK" - thisRef: ERROR_CALL 'Unresolved reference: this#' type=.Host + thisRef: GET_VAR ': .Host declared in .Host' type=.Host origin=null property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Host) returnType:kotlin.String correspondingProperty: PROPERTY name:testMember visibility:public modality:FINAL [delegated,val] @@ -97,7 +97,7 @@ FILE fqName: fileName:/member.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .Host' CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String declared in .Delegate' type=kotlin.String origin=null $this: GET_FIELD 'FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' type=.Delegate origin=GET_PROPERTY - thisRef: ERROR_CALL 'Unresolved reference: this#' type=.Host + thisRef: GET_VAR ': .Host declared in .Host' type=.Host origin=null property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field='FIELD DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt index 8e495ec5350..3102ef43fd9 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt @@ -53,13 +53,13 @@ FILE fqName: fileName:/memberExtension.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): .Host.StringDelegate declared in .Host' CONSTRUCTOR_CALL 'public constructor (s: kotlin.String) [primary] declared in .Host.StringDelegate' type=.Host.StringDelegate origin=null - s: ERROR_CALL 'Unresolved reference: this#' type=kotlin.String + s: GET_VAR ': kotlin.String declared in .Host.provideDelegate' type=kotlin.String origin=null PROPERTY name:plusK visibility:public modality:FINAL [delegated,val] FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final] EXPRESSION_BODY CALL 'public final fun provideDelegate (host: kotlin.Any?, p: kotlin.Any): .Host.StringDelegate declared in .Host' type=.Host.StringDelegate origin=null $this: CONST String type=kotlin.String value="K" - host: ERROR_CALL 'Unresolved reference: this#' type=.Host + host: GET_VAR ': .Host declared in .Host' type=.Host origin=null p: PROPERTY_REFERENCE 'public final plusK: IrErrorType [delegated,val]' field=null getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Host) returnType:IrErrorType correspondingProperty: PROPERTY name:plusK visibility:public modality:FINAL [delegated,val] @@ -67,7 +67,7 @@ FILE fqName: fileName:/memberExtension.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .Host' ERROR_CALL 'Unresolved reference: #' type=IrErrorType - ERROR_CALL 'Unresolved reference: this#' type=.Host + GET_VAR ': .Host declared in .Host' type=.Host origin=null PROPERTY_REFERENCE 'public final plusK: IrErrorType [delegated,val]' field='FIELD DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null PROPERTY name:ok visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:public [final] diff --git a/compiler/testData/ir/irText/expressions/assignments.fir.txt b/compiler/testData/ir/irText/expressions/assignments.fir.txt index 006b3424d22..61f46f42ff1 100644 --- a/compiler/testData/ir/irText/expressions/assignments.fir.txt +++ b/compiler/testData/ir/irText/expressions/assignments.fir.txt @@ -51,5 +51,6 @@ FILE fqName: fileName:/assignments.kt FUN name:test2 visibility:public modality:FINAL <> (r:.Ref) returnType:kotlin.Unit VALUE_PARAMETER name:r index:0 type:.Ref BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_VAR 'r: .Ref declared in .test2' type=.Ref origin=null value: CONST Int type=kotlin.Int value=0 diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.txt index 3820fc7f431..fff46ebdb27 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.txt @@ -30,13 +30,13 @@ FILE fqName: fileName:/augmentedAssignment1.kt CONST Int type=kotlin.Int value=5 FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=2 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=3 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=4 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=5 diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.txt index 05c9c05a60e..166b8899456 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.txt @@ -63,13 +63,13 @@ FILE fqName: fileName:/augmentedAssignment2.kt CONST String type=.A value="*=" FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=.A origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=kotlin.Unit origin=null value: CONST String type=.A value="+=" - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=.A origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=kotlin.Unit origin=null value: CONST String type=.A value="-=" - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=.A origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=kotlin.Unit origin=null value: CONST String type=.A value="*=" - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=.A origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=kotlin.Unit origin=null value: CONST String type=.A value="/=" - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=.A origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:.A visibility:public [final,static]' type=kotlin.Unit origin=null value: CONST String type=.A value="%=" diff --git a/compiler/testData/ir/irText/expressions/calls.fir.txt b/compiler/testData/ir/irText/expressions/calls.fir.txt index e330d0c166a..bb3055ec700 100644 --- a/compiler/testData/ir/irText/expressions/calls.fir.txt +++ b/compiler/testData/ir/irText/expressions/calls.fir.txt @@ -25,14 +25,14 @@ FILE fqName: fileName:/calls.kt $receiver: VALUE_PARAMETER name: type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun ext1 (): kotlin.Int declared in ' - ERROR_CALL 'Unresolved reference: this#' type=kotlin.Int + GET_VAR ': kotlin.Int declared in .ext1' type=kotlin.Int origin=null FUN name:ext2 visibility:public modality:FINAL <> ($receiver:kotlin.Int, x:kotlin.Int) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Int VALUE_PARAMETER name:x index:0 type:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun ext2 (x: kotlin.Int): kotlin.Int declared in ' CALL 'public final fun foo (x: kotlin.Int, y: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - x: ERROR_CALL 'Unresolved reference: this#' type=kotlin.Int + x: GET_VAR ': kotlin.Int declared in .ext2' type=kotlin.Int origin=null y: GET_VAR 'x: kotlin.Int declared in .ext2' type=kotlin.Int origin=null FUN name:ext3 visibility:public modality:FINAL <> ($receiver:kotlin.Int, x:kotlin.Int) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt b/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt index d9f18977b5b..ddd987d97ee 100644 --- a/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt +++ b/compiler/testData/ir/irText/expressions/castToTypeParameter.fir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/castToTypeParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun castExtFun (): T of .castExtFun declared in ' TYPE_OP type=T of .castExtFun origin=CAST typeOperand=T of .castExtFun - ERROR_CALL 'Unresolved reference: this#' type=kotlin.Any + GET_VAR ': kotlin.Any declared in .castExtFun' type=kotlin.Any origin=null PROPERTY name:castExtVal visibility:public modality:FINAL [val] FUN name: visibility:public modality:FINAL <> () returnType:T of correspondingProperty: PROPERTY name:castExtVal visibility:public modality:FINAL [val] @@ -48,7 +48,7 @@ FILE fqName: fileName:/castToTypeParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun castMemberExtFun (): T of .Host declared in .Host' TYPE_OP type=T of .Host origin=CAST typeOperand=T of .Host - ERROR_CALL 'Unresolved reference: this#' type=kotlin.Any + GET_VAR ': kotlin.Any declared in .Host.castMemberExtFun' type=kotlin.Any origin=null FUN name:castGenericMemberExtFun visibility:public modality:FINAL ($this:.Host, $receiver:kotlin.Any) returnType:TF of .Host.castGenericMemberExtFun TYPE_PARAMETER name:TF index:0 variance: superTypes:[] $this: VALUE_PARAMETER name: type:.Host @@ -56,7 +56,7 @@ FILE fqName: fileName:/castToTypeParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun castGenericMemberExtFun (): TF of .Host.castGenericMemberExtFun declared in .Host' TYPE_OP type=TF of .Host.castGenericMemberExtFun origin=CAST typeOperand=TF of .Host.castGenericMemberExtFun - ERROR_CALL 'Unresolved reference: this#' type=kotlin.Any + GET_VAR ': kotlin.Any declared in .Host.castGenericMemberExtFun' type=kotlin.Any origin=null PROPERTY name:castMemberExtVal visibility:public modality:FINAL [val] FUN name: visibility:public modality:FINAL <> ($this:.Host) returnType:T of .Host correspondingProperty: PROPERTY name:castMemberExtVal visibility:public modality:FINAL [val] @@ -64,7 +64,7 @@ FILE fqName: fileName:/castToTypeParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of .Host declared in .Host' TYPE_OP type=T of .Host origin=CAST typeOperand=T of .Host - ERROR_CALL 'Unresolved reference: this#' type=.Host.Host> + GET_VAR ': .Host declared in .Host' type=.Host.Host> origin=null PROPERTY name:castGenericMemberExtVal visibility:public modality:FINAL [val] FUN name: visibility:public modality:FINAL <> ($this:.Host) returnType:TV of correspondingProperty: PROPERTY name:castGenericMemberExtVal visibility:public modality:FINAL [val] @@ -72,7 +72,7 @@ FILE fqName: fileName:/castToTypeParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): TV of declared in .Host' TYPE_OP type=TV of origin=CAST typeOperand=TV of - ERROR_CALL 'Unresolved reference: this#' type=.Host.Host> + GET_VAR ': .Host declared in .Host' type=.Host.Host> origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt index ae5d0adaaa2..5be2d34b4a2 100644 --- a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.fir.txt @@ -9,12 +9,12 @@ FILE fqName: fileName:/chainOfSafeCalls.kt $this: VALUE_PARAMETER name: type:.C BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (): .C declared in .C' - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null FUN name:bar visibility:public modality:FINAL <> ($this:.C) returnType:.C? $this: VALUE_PARAMETER name: type:.C BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun bar (): .C? declared in .C' - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt index 4554a665f4c..a552e17e9ff 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt @@ -21,7 +21,9 @@ FILE fqName: fileName:/coercionToUnit.kt BLOCK_BODY CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="Hello," CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="world!" diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt index 60427ba3139..8983688dfae 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt @@ -145,21 +145,24 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .X1' type=kotlin.Int origin=null $this: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x1 type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x1 type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .X1.X2' type=kotlin.Int origin=null $this: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x2 type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x2 type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .X1.X2.X3' type=kotlin.Int origin=null $this: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2.X3 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x3 type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x3 type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2.X3 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null @@ -215,7 +218,8 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt $receiver: VALUE_PARAMETER name: type:.B VALUE_PARAMETER name:b index:0 type:.B BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_VAR ': .B declared in .Host.plusAssign' type=.B origin=null value: CALL 'public final fun (): kotlin.Int declared in .B' type=kotlin.Int origin=null $this: GET_VAR 'b: .B declared in .Host.plusAssign' type=.B origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt index e8c3dd5becc..161c735182a 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.txt @@ -37,7 +37,7 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt FUN name:bar visibility:public modality:FINAL <> ($this:.MyEnum.Z) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.MyEnum.Z BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .MyEnum.Z' type=kotlin.Unit origin=null PROPERTY name:aLambda visibility:public modality:FINAL [val] @@ -47,7 +47,7 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.MyEnum.Z) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.MyEnum.Z BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .MyEnum.Z' type=kotlin.Unit origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.MyEnum.Z) returnType:kotlin.Function0 @@ -69,13 +69,13 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name: modality:FINAL visibility:local superTypes:[kotlin.Any]' ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .MyEnum.Z' type=kotlin.Unit origin=null FUN name:test visibility:public modality:FINAL <> ($this:.MyEnum.Z.anObject.) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.MyEnum.Z.anObject. BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .MyEnum.Z' type=kotlin.Unit origin=null CONSTRUCTOR_CALL 'private constructor () [primary] declared in .MyEnum.Z.anObject.' type=.MyEnum.Z.anObject. origin=null diff --git a/compiler/testData/ir/irText/expressions/field.fir.txt b/compiler/testData/ir/irText/expressions/field.fir.txt index 00096ff9bc2..5e83710d0f5 100644 --- a/compiler/testData/ir/irText/expressions/field.fir.txt +++ b/compiler/testData/ir/irText/expressions/field.fir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/field.kt correspondingProperty: PROPERTY name:testSimple visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: GET_VAR 'value: kotlin.Int declared in .' type=kotlin.Int origin=null PROPERTY name:testAugmented visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:public [static] @@ -27,5 +27,5 @@ FILE fqName: fileName:/field.kt correspondingProperty: PROPERTY name:testAugmented visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: GET_VAR 'value: kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt index c504e11c56d..da0f81300f9 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt @@ -82,7 +82,7 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt BLOCK type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .IntCell' type=kotlin.Int origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null GET_VAR 'val : kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt index f6b27dc62f9..62845df2d3c 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt @@ -168,9 +168,9 @@ FILE fqName: fileName:/genericPropertyRef.kt correspondingProperty: PROPERTY name:bar visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:T of BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:recivier type:kotlin.Any? visibility:public [static]' type=kotlin.Any? origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:recivier type:kotlin.Any? visibility:public [static]' type=kotlin.Unit origin=null value: ERROR_CALL 'Unresolved reference: this#' type=IrErrorType - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.Any? visibility:public [static]' type=kotlin.Any? origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.Any? visibility:public [static]' type=kotlin.Unit origin=null value: GET_VAR 'value: T of declared in .' type=T of origin=null PROPERTY name:barRef visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:barRef type:kotlin.String.Companion visibility:public [final,static] diff --git a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt index 85189d22e39..281b4715245 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt @@ -7,8 +7,8 @@ FILE fqName: fileName:/implicitCastToTypeParameter.kt WHEN type=kotlin.Any? origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T of .test1 - ERROR_CALL 'Unresolved reference: this#' type=kotlin.Any - then: ERROR_CALL 'Unresolved reference: this#' type=kotlin.Any + GET_VAR ': kotlin.Any declared in .test1' type=kotlin.Any origin=null + then: GET_VAR ': kotlin.Any declared in .test1' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: CONST Null type=kotlin.Nothing? value=null diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt index a6567b26b60..a10f29e63c2 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt @@ -72,7 +72,7 @@ FILE fqName: fileName:/incrementDecrement.kt BLOCK type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPrefix' type=kotlin.Int origin=null CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null @@ -80,7 +80,7 @@ FILE fqName: fileName:/incrementDecrement.kt BLOCK type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPrefix' type=kotlin.Int origin=null CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null @@ -90,7 +90,7 @@ FILE fqName: fileName:/incrementDecrement.kt BLOCK type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null GET_VAR 'val : kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null @@ -98,7 +98,7 @@ FILE fqName: fileName:/incrementDecrement.kt BLOCK type=kotlin.Int origin=null VAR name: type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt index 0f519e80993..8208b45f5f4 100644 --- a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt @@ -7,7 +7,7 @@ FILE fqName: fileName:/Derived.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived modality:FINAL visibility:public superTypes:[.Base]' ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=0 FUN name:getValue visibility:public modality:FINAL <> ($this:.Derived) returnType:kotlin.Int $this: VALUE_PARAMETER name: type:.Derived @@ -18,7 +18,8 @@ FILE fqName: fileName:/Derived.kt $this: VALUE_PARAMETER name: type:.Derived VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_VAR ': .Derived declared in .Derived' type=.Derived origin=null value: GET_VAR 'value: kotlin.Int declared in .Derived.setValue' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt index cf5f0f0784f..778e2bd9adf 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.fir.txt @@ -3,6 +3,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="testFun" PROPERTY name:testProp visibility:public modality:FINAL [var] FUN name: visibility:public modality:FINAL <> () returnType:kotlin.Any @@ -10,6 +11,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="testProp/get" RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any declared in ' CONST Int type=kotlin.Any value=42 @@ -19,6 +21,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="testProp/set" CLASS CLASS name:TestClass modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestClass @@ -35,6 +38,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt then: BLOCK type=kotlin.Int origin=null CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="TestClass/test" CONST Int type=kotlin.Int value=42 FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestClass) returnType:kotlin.Int @@ -48,6 +52,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'public open fun println (x: kotlin.String?): kotlin.Unit declared in java.io.PrintStream' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public [final,static]' type=java.io.PrintStream? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:System modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit x: CONST String type=kotlin.String value="TestClass/init" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/expressions/kt16904.fir.txt b/compiler/testData/ir/irText/expressions/kt16904.fir.txt index a6e84b1f61e..1608ce5f6b3 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.fir.txt @@ -75,9 +75,9 @@ FILE fqName: fileName:/kt16904.kt $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 CONSTRUCTOR visibility:public <> () returnType:.Test1 BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:.B visibility:public [final]' type=.B origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:.B visibility:public [final]' type=kotlin.Unit origin=null value: CONST Int type=.B value=42 - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=42 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[.A]' @@ -102,7 +102,7 @@ FILE fqName: fileName:/kt16904.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[.J]' ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:field type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:field type:kotlin.Int visibility:public' type=kotlin.Unit 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 overridden: diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 36c91365d41..6e59fe7419b 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -99,7 +99,7 @@ FILE fqName: fileName:/kt30020.kt FUN name:testOuterThis visibility:public modality:FINAL <> ($this:.AML.Inner) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.AML.Inner BLOCK_BODY - ERROR_CALL 'Unresolved reference: this@AML' type=IrErrorType + ERROR_CALL 'Unresolved reference: this@AML#' type=IrErrorType FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/objectReference.fir.txt b/compiler/testData/ir/irText/expressions/objectReference.fir.txt index e46e9888e73..9fe4f187de2 100644 --- a/compiler/testData/ir/irText/expressions/objectReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReference.fir.txt @@ -30,10 +30,11 @@ FILE fqName: fileName:/objectReference.kt FUN name:bar visibility:public modality:FINAL <> ($this:.Z) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Z BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z @@ -45,20 +46,22 @@ FILE fqName: fileName:/objectReference.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Nested modality:FINAL visibility:public superTypes:[kotlin.Any]' ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z FUN name:test visibility:public modality:FINAL <> ($this:.Z.Nested) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Z.Nested BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z @@ -82,10 +85,11 @@ FILE fqName: fileName:/objectReference.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.Z) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Z BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z @@ -108,20 +112,22 @@ FILE fqName: fileName:/objectReference.kt INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name: modality:FINAL visibility:local superTypes:[kotlin.Any]' ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z FUN name:test visibility:public modality:FINAL <> ($this:.Z.anObject.) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Z.anObject. BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z @@ -149,10 +155,11 @@ FILE fqName: fileName:/objectReference.kt FUN name:test visibility:public modality:FINAL <> ($receiver:.Z) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.Z BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z value: CONST Int type=kotlin.Int value=1 CALL 'public final fun foo (): kotlin.Unit declared in .Z' type=kotlin.Unit origin=null $this: GET_OBJECT 'CLASS OBJECT name:Z modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Z diff --git a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt index e2533a2f314..042aafd71b7 100644 --- a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt @@ -135,7 +135,7 @@ FILE fqName: fileName:/propertyReferences.kt correspondingProperty: PROPERTY name:varWithBackingFieldAndAccessors visibility:public modality:FINAL [var] VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [static]' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [static]' type=kotlin.Unit origin=null value: GET_VAR 'value: kotlin.Int declared in .' type=kotlin.Int origin=null PROPERTY name:test_varWithBackingFieldAndAccessors visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [final,static] diff --git a/compiler/testData/ir/irText/expressions/safeAssignment.fir.txt b/compiler/testData/ir/irText/expressions/safeAssignment.fir.txt index 5fbb602d307..91a6f542596 100644 --- a/compiler/testData/ir/irText/expressions/safeAssignment.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeAssignment.fir.txt @@ -41,5 +41,6 @@ FILE fqName: fileName:/safeAssignment.kt FUN name:test visibility:public modality:FINAL <> (nc:.C?) returnType:kotlin.Unit VALUE_PARAMETER name:nc index:0 type:.C? BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_VAR 'nc: .C? declared in .test' type=.C? origin=null value: CONST Int type=kotlin.Int? value=42 diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt index 46cd1b835af..00d8591045f 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt @@ -33,7 +33,7 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun inc (): kotlin.Int? declared in test' CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=kotlin.Int? + $this: GET_VAR ': kotlin.Int? declared in test.inc' type=kotlin.Int? origin=null FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Int?, index:kotlin.Int) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Int? VALUE_PARAMETER name:index index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt index 996e7d83c1d..67fcbe69f31 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt @@ -81,7 +81,8 @@ FILE fqName: fileName:/safeCalls.kt FUN name:test4 visibility:public modality:FINAL <> (x:.Ref?) returnType:kotlin.Unit VALUE_PARAMETER name:x index:0 type:.Ref? BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null + receiver: GET_VAR 'x: .Ref? declared in .test4' type=.Ref? origin=null value: CONST Int type=kotlin.Int? value=0 FUN name:test5 visibility:public modality:FINAL <> ($receiver:.IHost, s:kotlin.String?) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.IHost diff --git a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt index 4ceef152aca..9fe1ea2dde6 100644 --- a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.txt @@ -5,21 +5,21 @@ FILE fqName: fileName:/samOperators.kt $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY CALL 'public open fun get (k: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=.J + $this: GET_VAR ': .J declared in .test1' type=.J origin=null k: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType CALL 'public open fun get (k: java.lang.Runnable?, m: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=.J + $this: GET_VAR ': .J declared in .test1' type=.J origin=null k: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType m: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType FUN name:test2 visibility:public modality:FINAL <> ($receiver:.J) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY CALL 'public open fun set (k: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=.J + $this: GET_VAR ': .J declared in .test2' type=.J origin=null k: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType v: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType CALL 'public open fun set (k: java.lang.Runnable?, m: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=.J + $this: GET_VAR ': .J declared in .test2' type=.J origin=null k: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType m: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType v: ERROR_CALL 'Unsupported callable reference: ::#' type=IrErrorType diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt index 2f9245e4bf9..2d4e13b6e43 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt @@ -14,7 +14,7 @@ FILE fqName: fileName:/Derived.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null then: BLOCK type=kotlin.Unit origin=null - SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.String? origin=null + SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.Unit origin=null value: GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: diff --git a/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt b/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt index fedbd73d770..298140214b4 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInInitBlock.fir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/temporaryInInitBlock.kt receiver: GET_VAR ': .C declared in .C.' type=.C origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String? visibility:public [final]' type=kotlin.String? origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String? visibility:public [final]' type=kotlin.Unit origin=null value: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null $this: GET_VAR 'x: kotlin.Any? declared in .C.' type=kotlin.Any? origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean diff --git a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt index 3b49a1a2b2d..51d4fdf7a29 100644 --- a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt +++ b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.fir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/thisReferenceBeforeClassDeclared.kt CONSTRUCTOR visibility:private <> () returnType:.WithCompanion [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor (a: .WithCompanion.Companion) [primary] declared in .WithCompanion' - a: ERROR_CALL 'Unresolved reference: this#' type=.WithCompanion + a: GET_VAR ': .WithCompanion declared in .test' type=.WithCompanion origin=null INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name: modality:FINAL visibility:local superTypes:[.WithCompanion]' CONSTRUCTOR_CALL 'private constructor () [primary] declared in .test.' type=.test. origin=null VAR name:test2 type:.WithCompanion [val] @@ -39,7 +39,7 @@ FILE fqName: fileName:/thisReferenceBeforeClassDeclared.kt $this: VALUE_PARAMETER name: type:.WithCompanion.Companion BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (): .WithCompanion.Companion declared in .WithCompanion.Companion' - ERROR_CALL 'Unresolved reference: this#' type=.WithCompanion.Companion + GET_VAR ': .WithCompanion.Companion declared in .WithCompanion.Companion' type=.WithCompanion.Companion origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt b/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt index 331d57eca61..6b93d896063 100644 --- a/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt +++ b/compiler/testData/ir/irText/expressions/useImportedMember.fir.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/useImportedMember.kt $receiver: VALUE_PARAMETER name: type:T of .I.fromInterface BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun fromInterface (): T of .I.fromInterface declared in .I' - ERROR_CALL 'Unresolved reference: this#' type=T of .I.fromInterface + GET_VAR ': T of .I.fromInterface declared in .I.fromInterface' type=T of .I.fromInterface origin=null FUN name:genericFromSuper visibility:public modality:OPEN <> ($this:.I, g:G of .I) returnType:G of .I $this: VALUE_PARAMETER name: type:.I VALUE_PARAMETER name:g index:0 type:G of .I @@ -40,7 +40,7 @@ FILE fqName: fileName:/useImportedMember.kt $this: VALUE_PARAMETER name: type:.BaseClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of declared in .BaseClass' - ERROR_CALL 'Unresolved reference: this#' type=.BaseClass + GET_VAR ': .BaseClass declared in .BaseClass' type=.BaseClass origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -117,7 +117,7 @@ FILE fqName: fileName:/useImportedMember.kt $this: VALUE_PARAMETER name: type:.C BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of declared in .C' - ERROR_CALL 'Unresolved reference: this#' type=.C + GET_VAR ': .C declared in .C' type=.C origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -178,7 +178,7 @@ FILE fqName: fileName:/useImportedMember.kt arg1: CONST Int type=kotlin.Int value=4 then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CONST String type=kotlin.String value="4" - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public' type=kotlin.Int origin=null + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:public' type=kotlin.Unit origin=null value: CONST Int type=kotlin.Int value=5 WHEN type=kotlin.Unit origin=IF BRANCH diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt index a00aef9ba84..aeaddff6437 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/variableAsFunctionCall.kt FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - ERROR_CALL 'Unresolved reference: this#' type=kotlin.String + GET_VAR ': kotlin.String declared in .k' type=kotlin.String origin=null FUN name:test1 visibility:public modality:FINAL <> (f:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:f index:0 type:kotlin.Function0 BLOCK_BODY diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt index 70a270ca63d..b14c20e7178 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt @@ -9,7 +9,7 @@ FILE fqName: fileName:/builtinMap.kt WHEN type=kotlin.collections.Map.plus, V1 of .plus> origin=IF BRANCH if: CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Map' type=kotlin.Boolean origin=null - $this: ERROR_CALL 'Unresolved reference: this#' type=kotlin.collections.Map.plus, V1 of .plus> + $this: GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null then: CALL 'public final fun mapOf (pair: kotlin.Pair, V of >): kotlin.collections.Map, V of > declared in kotlin.collections' type=kotlin.collections.Map.plus, V1 of .plus> origin=null pair: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null BRANCH @@ -18,7 +18,7 @@ FILE fqName: fileName:/builtinMap.kt $receiver: CONSTRUCTOR_CALL 'public constructor (: kotlin.collections.Map?) declared in java.util.LinkedHashMap' type=java.util.LinkedHashMap.plus, V1 of .plus> origin=null : : - : ERROR_CALL 'Unresolved reference: this#' type=kotlin.collections.Map.plus, V1 of .plus> + : GET_VAR ': kotlin.collections.Map.plus, V1 of .plus> declared in .plus' type=kotlin.collections.Map.plus, V1 of .plus> origin=null block: FUN_EXPR type=kotlin.Function2.plus, V1 of .plus>, java.util.LinkedHashMap.plus, V1 of .plus>, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:java.util.LinkedHashMap.plus, V1 of .plus>) returnType:kotlin.Unit VALUE_PARAMETER name:it index:0 type:java.util.LinkedHashMap.plus, V1 of .plus> diff --git a/compiler/testData/ir/irText/stubs/javaEnum.fir.txt b/compiler/testData/ir/irText/stubs/javaEnum.fir.txt index cafbcf9c988..0d4cbd54a4e 100644 --- a/compiler/testData/ir/irText/stubs/javaEnum.fir.txt +++ b/compiler/testData/ir/irText/stubs/javaEnum.fir.txt @@ -3,6 +3,7 @@ FILE fqName: fileName:/javaEnum.kt FIELD PROPERTY_BACKING_FIELD name:test type:.JEnum? visibility:public [final,static] EXPRESSION_BODY GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:ONE type:.JEnum? visibility:public [final,static]' type=.JEnum? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS ENUM_CLASS name:JEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<.JEnum>]' type=kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.JEnum? correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt b/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt index d7b37e0e0d6..071cc03ed7a 100644 --- a/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt +++ b/compiler/testData/ir/irText/types/asOnPlatformType.fir.txt @@ -19,11 +19,11 @@ FILE fqName: fileName:/asOnPlatformType.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (): T of .foo [inline] declared in ' TYPE_OP type=T of .foo origin=CAST typeOperand=T of .foo - ERROR_CALL 'Unresolved reference: this#' type=T of .foo + GET_VAR ': T of .foo declared in .foo' type=T of .foo origin=null FUN name:fooN visibility:public modality:FINAL ($receiver:T of .fooN) returnType:T of .fooN? [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[] $receiver: VALUE_PARAMETER name: type:T of .fooN BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun fooN (): T of .fooN? [inline] declared in ' TYPE_OP type=T of .fooN? origin=CAST typeOperand=T of .fooN? - ERROR_CALL 'Unresolved reference: this#' type=T of .fooN + GET_VAR ': T of .fooN declared in .fooN' type=T of .fooN origin=null diff --git a/compiler/testData/ir/irText/types/intersectionType3_NI.fir.txt b/compiler/testData/ir/irText/types/intersectionType3_NI.fir.txt index 07938c7dafe..706512e887a 100644 --- a/compiler/testData/ir/irText/types/intersectionType3_NI.fir.txt +++ b/compiler/testData/ir/irText/types/intersectionType3_NI.fir.txt @@ -21,13 +21,13 @@ FILE fqName: fileName:/intersectionType3_NI.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun isT (): kotlin.Boolean [inline] declared in ' TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T of .isT - ERROR_CALL 'Unresolved reference: this#' type=.In.isT> + GET_VAR ': .In.isT> declared in .isT' type=.In.isT> origin=null FUN name:asT visibility:public modality:FINAL ($receiver:.In.asT>) returnType:kotlin.Unit [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[] $receiver: VALUE_PARAMETER name: type:.In.asT> BLOCK_BODY TYPE_OP type=T of .asT origin=CAST typeOperand=T of .asT - ERROR_CALL 'Unresolved reference: this#' type=.In.asT> + GET_VAR ': .In.asT> declared in .asT' type=.In.asT> origin=null FUN name:sel visibility:public modality:FINAL (x:S of .sel, y:S of .sel) returnType:S of .sel TYPE_PARAMETER name:S index:0 variance: superTypes:[] VALUE_PARAMETER name:x index:0 type:S of .sel diff --git a/compiler/testData/ir/irText/types/intersectionType3_OI.fir.txt b/compiler/testData/ir/irText/types/intersectionType3_OI.fir.txt index 49f69cdef24..371fbe5ef0e 100644 --- a/compiler/testData/ir/irText/types/intersectionType3_OI.fir.txt +++ b/compiler/testData/ir/irText/types/intersectionType3_OI.fir.txt @@ -21,13 +21,13 @@ FILE fqName: fileName:/intersectionType3_OI.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun isT (): kotlin.Boolean [inline] declared in ' TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T of .isT - ERROR_CALL 'Unresolved reference: this#' type=.In.isT> + GET_VAR ': .In.isT> declared in .isT' type=.In.isT> origin=null FUN name:asT visibility:public modality:FINAL ($receiver:.In.asT>) returnType:kotlin.Unit [inline] TYPE_PARAMETER name:T index:0 variance: superTypes:[] $receiver: VALUE_PARAMETER name: type:.In.asT> BLOCK_BODY TYPE_OP type=T of .asT origin=CAST typeOperand=T of .asT - ERROR_CALL 'Unresolved reference: this#' type=.In.asT> + GET_VAR ': .In.asT> declared in .asT' type=.In.asT> origin=null FUN name:sel visibility:public modality:FINAL (x:S of .sel, y:S of .sel) returnType:S of .sel TYPE_PARAMETER name:S index:0 variance: superTypes:[] VALUE_PARAMETER name:x index:0 type:S of .sel diff --git a/compiler/testData/ir/irText/types/platformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/platformTypeReceiver.fir.txt index 809e2ea1a62..2ee02e1e886 100644 --- a/compiler/testData/ir/irText/types/platformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/platformTypeReceiver.fir.txt @@ -4,6 +4,7 @@ FILE fqName: fileName:/platformTypeReceiver.kt RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any' type=kotlin.Boolean origin=null $this: GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:BOOL_NULL type:kotlin.Boolean? visibility:public [static]' type=kotlin.Boolean? origin=GET_PROPERTY + receiver: GET_OBJECT 'CLASS CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit other: CONST Null type=kotlin.Nothing? value=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Boolean BLOCK_BODY