diff --git a/compiler/fir/analysis-tests/testData/resolve/delegatedSuperType.txt b/compiler/fir/analysis-tests/testData/resolve/delegatedSuperType.txt index 13ab99c38db..44fedf60655 100644 --- a/compiler/fir/analysis-tests/testData/resolve/delegatedSuperType.txt +++ b/compiler/fir/analysis-tests/testData/resolve/delegatedSuperType.txt @@ -13,11 +13,11 @@ FILE: delegatedSuperType.kt } public final class C : R|A| { - local final field $$delegate_0: R|A| + local final field <$$delegate_0>: R|A| public constructor(b: R|B|): R|C| { super() - this@R|/C|.R|/$$delegate_0| = R|/b| + this@R|/C|.R|/<$$delegate_0>| = R|/b| } public final val b: R|B| = R|/b| diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.kt new file mode 100644 index 00000000000..e86f6686623 --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.kt @@ -0,0 +1,17 @@ +// ISSUE #KT-40409 + +interface A { + var b: B +} + +interface B + +fun A.test_1() { + object : B by this.b {} +} + +fun A.test_2() { + object : B by b {} +} + +class D(val x: String, val y: String = this.x) {} \ No newline at end of file diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.txt new file mode 100644 index 00000000000..8644185eb8a --- /dev/null +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.txt @@ -0,0 +1,45 @@ +FILE: anonymousObjectByDelegate.kt + public abstract interface A : R|kotlin/Any| { + public abstract var b: R|B| + public get(): R|B| + public set(value: R|B|): R|kotlin/Unit| + + } + public abstract interface B : R|kotlin/Any| { + } + public final fun R|A|.test_1(): R|kotlin/Unit| { + object : R|B| { + local final field <$$delegate_0>: R|B| + + private[local] constructor(): R|| { + super() + this@R|/|.R|/<$$delegate_0>| = this@R|/test_1|.R|/A.b| + } + + } + + } + public final fun R|A|.test_2(): R|kotlin/Unit| { + object : R|B| { + local final field <$$delegate_0>: R|B| + + private[local] constructor(): R|| { + super() + this@R|/|.R|/<$$delegate_0>| = this@R|/test_2|.R|/A.b| + } + + } + + } + public final class D : R|kotlin/Any| { + public constructor(x: R|kotlin/String|, y: R|kotlin/String| = this#.#): R|D| { + super() + } + + public final val x: R|kotlin/String| = R|/x| + public get(): R|kotlin/String| + + public final val y: R|kotlin/String| = R|/y| + public get(): R|kotlin/String| + + } diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java index 75f5ad6fa94..135184802a2 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java @@ -896,6 +896,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest { runTest("compiler/fir/analysis-tests/testData/resolve/diagnostics/annotationClassMember.kt"); } + @TestMetadata("anonymousObjectByDelegate.kt") + public void testAnonymousObjectByDelegate() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.kt"); + } + @TestMetadata("incompatibleModifiers.kt") public void testIncompatibleModifiers() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/diagnostics/incompatibleModifiers.kt"); diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java index fff14b525d5..20b07a00b89 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java @@ -896,6 +896,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/analysis-tests/testData/resolve/diagnostics/annotationClassMember.kt"); } + @TestMetadata("anonymousObjectByDelegate.kt") + public void testAnonymousObjectByDelegate() throws Exception { + runTest("compiler/fir/analysis-tests/testData/resolve/diagnostics/anonymousObjectByDelegate.kt"); + } + @TestMetadata("incompatibleModifiers.kt") public void testIncompatibleModifiers() throws Exception { runTest("compiler/fir/analysis-tests/testData/resolve/diagnostics/incompatibleModifiers.kt"); diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt index 1f465243939..d20951ae5be 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt @@ -36,8 +36,11 @@ import org.jetbrains.kotlin.fir.lightTree.fir.modifier.Modifier import org.jetbrains.kotlin.fir.lightTree.fir.modifier.TypeModifier import org.jetbrains.kotlin.fir.lightTree.fir.modifier.TypeParameterModifier import org.jetbrains.kotlin.fir.lightTree.fir.modifier.TypeProjectionModifier +import org.jetbrains.kotlin.fir.references.builder.buildImplicitThisReference +import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference import org.jetbrains.kotlin.fir.references.builder.buildSimpleNamedReference import org.jetbrains.kotlin.fir.scopes.FirScopeProvider +import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.CallableId import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.* @@ -406,7 +409,7 @@ class DeclarationsConverter( val selfType = classNode.toDelegatedSelfType(this) - val delegationSpecifiers = superTypeList?.let { convertDelegationSpecifiers(it) } + val delegationSpecifiers = superTypeList?.let { convertDelegationSpecifiers(it, symbol, selfType) } var delegatedSuperTypeRef: FirTypeRef? = delegationSpecifiers?.delegatedSuperTypeRef val delegatedConstructorSource: FirLightSourceElement? = delegationSpecifiers?.delegatedConstructorSource delegationSpecifiers?.delegateFields?.map { declarations += it } @@ -502,37 +505,6 @@ class DeclarationsConverter( * @see org.jetbrains.kotlin.fir.builder.RawFirBuilder.Visitor.visitObjectLiteralExpression */ fun convertObjectLiteral(objectLiteral: LighterASTNode): FirElement { - var modifiers = Modifier() - var primaryConstructor: LighterASTNode? = null - val superTypeRefs = mutableListOf() - val superTypeCallEntry = mutableListOf() - var delegatedSuperTypeRef: FirTypeRef? = null - var classBody: LighterASTNode? = null - var delegatedConstructorSource: FirLightSourceElement? = null - var delegateFields: List? = null - var primaryConstructorBody: FirBlock? = null - objectLiteral.getChildNodesByType(OBJECT_DECLARATION).first().forEachChildren { - when (it.tokenType) { - MODIFIER_LIST -> modifiers = convertModifierList(it) - PRIMARY_CONSTRUCTOR -> primaryConstructor = it - SUPER_TYPE_LIST -> convertDelegationSpecifiers(it).let { - delegatedSuperTypeRef = it.delegatedSuperTypeRef - superTypeRefs += it.superTypesRef - superTypeCallEntry += it.delegatedConstructorArguments - delegatedConstructorSource = it.delegatedConstructorSource - delegateFields = it.delegateFields - primaryConstructorBody = it.primaryConstructorBody - } - CLASS_BODY -> classBody = it - } - } - - superTypeRefs.ifEmpty { - superTypeRefs += implicitAnyType - delegatedSuperTypeRef = implicitAnyType - } - val delegatedSuperType = delegatedSuperTypeRef ?: buildImplicitTypeRef() - return withChildClassName(ANONYMOUS_OBJECT_NAME) { buildAnonymousObject { source = objectLiteral.toFirSourceElement() @@ -541,8 +513,41 @@ class DeclarationsConverter( classKind = ClassKind.OBJECT scopeProvider = baseScopeProvider symbol = FirAnonymousObjectSymbol() - typeParameters += context.capturedTypeParameters.map { buildOuterClassTypeParameterRef { symbol = it } } + typeParameters += context.capturedTypeParameters.map { buildOuterClassTypeParameterRef { this.symbol = it } } val delegatedSelfType = objectLiteral.toDelegatedSelfType(this) + + var modifiers = Modifier() + var primaryConstructor: LighterASTNode? = null + val superTypeRefs = mutableListOf() + val superTypeCallEntry = mutableListOf() + var delegatedSuperTypeRef: FirTypeRef? = null + var classBody: LighterASTNode? = null + var delegatedConstructorSource: FirLightSourceElement? = null + var delegateFields: List? = null + var primaryConstructorBody: FirBlock? = null + + objectLiteral.getChildNodesByType(OBJECT_DECLARATION).first().forEachChildren { + when (it.tokenType) { + MODIFIER_LIST -> modifiers = convertModifierList(it) + PRIMARY_CONSTRUCTOR -> primaryConstructor = it + SUPER_TYPE_LIST -> convertDelegationSpecifiers(it, symbol, delegatedSelfType).let { + delegatedSuperTypeRef = it.delegatedSuperTypeRef + superTypeRefs += it.superTypesRef + superTypeCallEntry += it.delegatedConstructorArguments + delegatedConstructorSource = it.delegatedConstructorSource + delegateFields = it.delegateFields + primaryConstructorBody = it.primaryConstructorBody + } + CLASS_BODY -> classBody = it + } + } + + superTypeRefs.ifEmpty { + superTypeRefs += implicitAnyType + delegatedSuperTypeRef = implicitAnyType + } + val delegatedSuperType = delegatedSuperTypeRef ?: buildImplicitTypeRef() + annotations += modifiers.annotations this.superTypeRefs += superTypeRefs typeRef = delegatedSelfType @@ -1322,7 +1327,7 @@ class DeclarationsConverter( val primaryConstructorBody: FirBlock? ) - private fun convertDelegationSpecifiers(delegationSpecifiers: LighterASTNode): DelegationSpecifiers { + private fun convertDelegationSpecifiers(delegationSpecifiers: LighterASTNode, containerSymbol: AbstractFirBasedSymbol<*>, delegatedTypeRef: FirTypeRef): DelegationSpecifiers { val superTypeRefs = mutableListOf() val superTypeCallEntry = mutableListOf() var delegatedSuperTypeRef: FirTypeRef? = null @@ -1340,7 +1345,7 @@ class DeclarationsConverter( delegateConstructorSource = it.toFirSourceElement() } DELEGATED_SUPER_TYPE_ENTRY -> { - superTypeRefs += convertExplicitDelegation(it, delegateNumber, delegateFields, initializeDelegateStatements) + superTypeRefs += convertExplicitDelegation(it, delegateNumber, delegateFields, initializeDelegateStatements, containerSymbol, delegatedTypeRef) delegateNumber++ } } @@ -1388,7 +1393,9 @@ class DeclarationsConverter( explicitDelegation: LighterASTNode, delegateNumber: Int, delegateFields: MutableList, - initializeDelegateStatements: MutableList + initializeDelegateStatements: MutableList, + containerSymbol: AbstractFirBasedSymbol<*>, + delegatedSelfTypeRef: FirTypeRef ): FirTypeRef { lateinit var firTypeRef: FirTypeRef var firExpression: FirExpression? = buildErrorExpression( @@ -1401,14 +1408,14 @@ class DeclarationsConverter( } } - val delegateName = Name.identifier("\$\$delegate_$delegateNumber") + val delegateName = Name.special("<\$\$delegate_$delegateNumber>") delegateFields.add( buildField { source = firExpression!!.source session = baseSession origin = FirDeclarationOrigin.Synthetic name = delegateName - returnTypeRef = firTypeRef!! + returnTypeRef = firTypeRef symbol = FirFieldSymbol(CallableId(name)) isVar = false status = FirDeclarationStatusImpl(Visibilities.LOCAL, Modality.FINAL) @@ -1418,10 +1425,17 @@ class DeclarationsConverter( buildVariableAssignment { source = firExpression!!.source calleeReference = - buildSimpleNamedReference { + buildResolvedNamedReference { name = delegateName + resolvedSymbol = delegateFields[delegateNumber].symbol } rValue = firExpression!! + dispatchReceiver = buildThisReceiverExpression { + calleeReference = buildImplicitThisReference { + boundSymbol = containerSymbol + } + typeRef = delegatedSelfTypeRef + } } ) return firTypeRef diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index fd1c05bd77a..2daa2b0d32a 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -28,6 +28,7 @@ import org.jetbrains.kotlin.fir.expressions.impl.FirSingleExpressionBlock import org.jetbrains.kotlin.fir.references.FirNamedReference import org.jetbrains.kotlin.fir.references.builder.* import org.jetbrains.kotlin.fir.scopes.FirScopeProvider +import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.CallableId import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.* @@ -455,7 +456,8 @@ class RawFirBuilder( delegatedSelfTypeRef: FirTypeRef?, delegatedEnumSuperTypeRef: FirTypeRef?, classKind: ClassKind, - containerTypeParameters: List + containerTypeParameters: List, + containerSymbol: AbstractFirBasedSymbol<*> ): FirTypeRef { var superTypeCallEntry: KtSuperTypeCallEntry? = null var delegatedSuperTypeRef: FirTypeRef? = null @@ -475,7 +477,7 @@ class RawFirBuilder( val type = superTypeListEntry.typeReference.toFirOrErrorType() val delegateExpression = { superTypeListEntry.delegateExpression }.toFirExpression("Should have delegate") container.superTypeRefs += type - val delegateName = Name.identifier("\$\$delegate_$delegateNumber") + val delegateName = Name.special("<\$\$delegate_$delegateNumber>") val delegateSource = superTypeListEntry.delegateExpression?.toFirSourceElement() val delegateField = buildField { source = delegateSource @@ -491,10 +493,17 @@ class RawFirBuilder( buildVariableAssignment { source = delegateSource calleeReference = - buildSimpleNamedReference { + buildResolvedNamedReference { name = delegateName + resolvedSymbol = delegateField.symbol } rValue = delegateExpression + dispatchReceiver = buildThisReceiverExpression { + calleeReference = buildImplicitThisReference { + boundSymbol = containerSymbol + } + delegatedSelfTypeRef?.let { typeRef = it } + } } ) container.declarations.add(delegateField) @@ -747,8 +756,14 @@ class RawFirBuilder( addCapturedTypeParameters(typeParameters.take(classOrObject.typeParameters.size)) val delegatedSelfType = classOrObject.toDelegatedSelfType(this) - val delegatedSuperType = - classOrObject.extractSuperTypeListEntriesTo(this, delegatedSelfType, null, classKind, typeParameters) + val delegatedSuperType = classOrObject.extractSuperTypeListEntriesTo( + this, + delegatedSelfType, + null, + classKind, + typeParameters, + symbol + ) val primaryConstructor = classOrObject.primaryConstructor val firPrimaryConstructor = declarations.firstOrNull {it is FirConstructor} as? FirConstructor @@ -827,7 +842,8 @@ class RawFirBuilder( delegatedSelfType, null, ClassKind.CLASS, - containerTypeParameters = emptyList() + containerTypeParameters = emptyList(), + symbol ) typeRef = delegatedSelfType diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt index 877bd91d8ef..023664aa7d5 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt @@ -526,13 +526,73 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor if (constructor.isPrimary && containingClass?.classKind == ClassKind.ANNOTATION_CLASS) { return withFirArrayOfCallTransformer { @Suppress("UNCHECKED_CAST") - transformFunction(constructor, data) as CompositeTransformResult + doTransformConstructor(constructor, data) } } @Suppress("UNCHECKED_CAST") - return transformFunction(constructor, data) as CompositeTransformResult + return doTransformConstructor(constructor, data) } + private fun doTransformConstructor(constructor: FirConstructor, data: ResolutionMode): CompositeTransformResult { + return context.withContainer(constructor) { + constructor.replaceResolvePhase(transformerPhase) + dataFlowAnalyzer.enterFunction(constructor) + + constructor.transformTypeParameters(transformer, data) + .transformAnnotations(transformer, data) + .transformReceiverTypeRef(transformer, data) + .transformReturnTypeRef(transformer, data) + + /* + * Default values of constructor can't access members of constructing class + */ + context.withTowerDataContext(context.getTowerDataContextForConstructorResolution()) { + withNewLocalScope { + constructor.transformValueParameters(transformer, data) + } + } + + val scopeWithValueParameters = if (constructor.isPrimary) { + context.getPrimaryConstructorParametersScope() + } else { + constructor.scopeWithParameters() + } + + /* + * Delegated constructor call is called before constructor body, so we need to + * analyze it before body, so body can access smartcasts from that call + */ + context.withTowerDataCleanup { + addLocalScope(scopeWithValueParameters) + constructor.transformDelegatedConstructor(transformer, data) + } + + if (constructor.body != null) { + if (constructor.isPrimary) { + /* + * Primary constructor may have body only if class delegates implementation to some property + * In it's body we don't have this receiver for building class, so we need to use + * special towerDataContext + */ + context.withTowerDataContext(context.getTowerDataContextForConstructorResolution()) { + addLocalScope(scopeWithValueParameters) + constructor.transformBody(transformer, data) + } + } else { + withLocalScopeCleanup { + addLocalScope(scopeWithValueParameters) + constructor.transformBody(transformer, data) + } + } + } + + val graph = dataFlowAnalyzer.exitFunction(constructor) + constructor.transformControlFlowGraphReference(ControlFlowGraphReferenceTransformer, graph) + constructor.compose() + } + } + + override fun transformAnonymousInitializer( anonymousInitializer: FirAnonymousInitializer, data: ResolutionMode @@ -753,7 +813,7 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor val constructor = (owner as? FirRegularClass)?.declarations?.firstOrNull { it is FirConstructor } as? FirConstructor val primaryConstructorParametersScope = if (constructor?.isPrimary == true) { - constructor.valueParameters.fold(FirLocalScope()) { acc, param -> acc.storeVariable(param) } + constructor.scopeWithParameters() } else null components.context.replaceTowerDataContext(forMembersResolution) @@ -770,6 +830,10 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor } } + private fun FirConstructor.scopeWithParameters(): FirLocalScope { + return valueParameters.fold(FirLocalScope()) { acc, param -> acc.storeVariable(param) } + } + protected inline fun withLabelAndReceiverType( labelName: Name?, owner: FirCallableDeclaration<*>, diff --git a/compiler/testData/codegen/box/closures/kt11634.kt b/compiler/testData/codegen/box/closures/kt11634.kt index 52810f11682..7bd1880718f 100644 --- a/compiler/testData/codegen/box/closures/kt11634.kt +++ b/compiler/testData/codegen/box/closures/kt11634.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface A { fun foo(): String } diff --git a/compiler/testData/codegen/box/closures/kt11634_2.kt b/compiler/testData/codegen/box/closures/kt11634_2.kt index c9ac4a9126b..1eb0e9ff096 100644 --- a/compiler/testData/codegen/box/closures/kt11634_2.kt +++ b/compiler/testData/codegen/box/closures/kt11634_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface A { fun foo(): String } diff --git a/compiler/testData/codegen/box/delegation/delegationToVal.kt b/compiler/testData/codegen/box/delegation/delegationToVal.kt index 8725b0767a0..3a9345b40f8 100644 --- a/compiler/testData/codegen/box/delegation/delegationToVal.kt +++ b/compiler/testData/codegen/box/delegation/delegationToVal.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/diagnostics/tests/scopes/classHeader/constructors.fir.kt b/compiler/testData/diagnostics/tests/scopes/classHeader/constructors.fir.kt index 886c5b062cf..ca57c76425b 100644 --- a/compiler/testData/diagnostics/tests/scopes/classHeader/constructors.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/classHeader/constructors.fir.kt @@ -10,8 +10,8 @@ class A( cc: Int = Companion.CONST, cn: Int = Nested.CONST, ci: Int = Interface.CONST, - t1: Int = a, - t2: Int = b() + t1: Int = a, + t2: Int = b() ) { constructor( @@ -25,8 +25,8 @@ class A( cc: Int = Companion.CONST, cn: Int = Nested.CONST, ci: Int = Interface.CONST, - t1: Int = a, - t2: Int = b() + t1: Int = a, + t2: Int = b() ) : this( foo(), Nested(), diff --git a/compiler/testData/diagnostics/tests/scopes/classHeader/delegation.fir.kt b/compiler/testData/diagnostics/tests/scopes/classHeader/delegation.fir.kt index b53bcf83750..2ad72457b4c 100644 --- a/compiler/testData/diagnostics/tests/scopes/classHeader/delegation.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/classHeader/delegation.fir.kt @@ -22,8 +22,8 @@ class A : I by S( Companion.CONST, Nested.CONST, Interface.CONST, - a, - b() + a, + b() ) { class Nested { diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.fir.kt index 76c24c1b31d..225107d83e4 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.fir.kt @@ -6,6 +6,6 @@ class Outer { } constructor(x: Int) - constructor(x: Int, y: Int, z: Int = x + Inner().prop + this.Inner().prop) : + constructor(x: Int, y: Int, z: Int = x + Inner().prop + this.Inner().prop) : this(x + Inner().prop + this.Inner().prop) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt index f67d2a5ec49..1b6fb0bafca 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.fir.kt @@ -2,6 +2,6 @@ class A { fun foo() = 1 constructor(x: Int) - constructor(x: Int, y: Int, z: Int = x + foo() + this.foo()) : + constructor(x: Int, y: Int, z: Int = x + foo() + this.foo()) : this(x + foo() + this.foo()) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.fir.kt index 3c312d74e40..360383e4cd0 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.fir.kt @@ -5,7 +5,7 @@ fun A.foobar() = 3 class A { fun foo() = 1 constructor( x: Any = object { - fun bar() = foo() + this@A.foo() + - foobar() + fun bar() = foo() + this@A.foo() + + foobar() }) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt index 73c5b28e651..976392d5903 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.fir.kt @@ -2,6 +2,6 @@ class A { val prop = 1 constructor(x: Int) - constructor(x: Int, y: Int, z: Int = x + prop + this.prop) : + constructor(x: Int, y: Int, z: Int = x + prop + this.prop) : this(x + prop + this.prop) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt index e85a92ea072..5435edb16d5 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.fir.kt @@ -2,6 +2,6 @@ open class B(x: Int) class A : B { val prop = 1 - constructor(x: Int, y: Int = x + prop + this.prop) : + constructor(x: Int, y: Int = x + prop + this.prop) : super(x + prop + this.prop) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt index af51338bb5b..5637a70edd0 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.fir.kt @@ -3,6 +3,6 @@ open class B(x: Int) { fun foo() = 1 } class A : B { - constructor(x: Int, y: Int = x + foo() + this.foo() + super.foo()) : + constructor(x: Int, y: Int = x + foo() + this.foo() + super.foo()) : super(x + foo() + this.foo() + super.foo()) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt index 91357903eec..b24de18ef54 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.fir.kt @@ -4,6 +4,6 @@ open class B(x: Int) { } class A : B { override fun foo() = 2 - constructor(x: Int, y: Int = x + foo() + this.foo() + super.foo()) : + constructor(x: Int, y: Int = x + foo() + this.foo() + super.foo()) : super(x + foo() + this.foo() + super.foo()) } diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt index 26f4a1a157c..b608709e4b5 100644 --- a/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt +++ b/compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.fir.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER open class B(val prop: Int) class A : B { - constructor(x: Int, y: Int = x + prop + this.prop + super.prop) : + constructor(x: Int, y: Int = x + prop + this.prop + super.prop) : super(x + prop + this.prop + super.prop) } diff --git a/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.txt b/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.txt index 007a5c5ca47..1ff535b0d78 100644 --- a/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.txt +++ b/compiler/testData/ir/irText/classes/delegatedGenericImplementation.fir.txt @@ -46,7 +46,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt 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:[.IBase.Test1>]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test1> visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test1> visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Test1.Test1> declared in .Test1' type=.Test1.Test1> origin=null value: GET_VAR 'i: .IBase.Test1> declared in .Test1.' type=.IBase.Test1> origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN ($this:.Test1.Test1>, a:E of .Test1, b:B of .Test1.foo) returnType:kotlin.Unit @@ -59,7 +59,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt BLOCK_BODY CALL 'public abstract fun foo (a: A of .IBase, b: B of .IBase.foo): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null receiver: GET_VAR ': .Test1.Test1> declared in .Test1.foo' type=.Test1.Test1> origin=null a: GET_VAR 'a: E of .Test1 declared in .Test1.foo' type=E of .Test1 origin=null b: GET_VAR 'b: B of .Test1.foo declared in .Test1.foo' type=B of .Test1.foo origin=null @@ -74,7 +74,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Map.IBase, C of .IBase.>? declared in .Test1' CALL 'public abstract fun (): kotlin.collections.Map.IBase, C of .IBase.>? declared in .IBase' type=kotlin.collections.Map.Test1, C of .Test1.>? origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null receiver: GET_VAR ': .Test1.Test1> declared in .Test1.' type=.Test1.Test1> origin=null PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [var] FUN DELEGATED_MEMBER name: visibility:public modality:OPEN ($this:.Test1.Test1>) returnType:D of .IBase.? @@ -87,7 +87,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt RETURN type=kotlin.Nothing from='public open fun (): D of .IBase.? declared in .Test1' CALL 'public abstract fun (): D of .IBase.? declared in .IBase' type=D of .Test1.? origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null receiver: GET_VAR ': .Test1.Test1> declared in .Test1.' type=.Test1.Test1> origin=null FUN DELEGATED_MEMBER name: visibility:public modality:OPEN ($this:.Test1.Test1>, :D of .Test1.?) returnType:kotlin.Unit correspondingProperty: PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [var] @@ -99,10 +99,10 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt BLOCK_BODY CALL 'public abstract fun (: D of .IBase.?): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test1> visibility:local [final]' type=.IBase.Test1> origin=null receiver: GET_VAR ': .Test1.Test1> declared in .Test1.' type=.Test1.Test1> origin=null : GET_VAR ': D of .Test1.? declared in .Test1.' type=D of .Test1.? origin=null - FIELD DELEGATE name:$$delegate_0 type:.IBase.Test1> visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test1> visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -123,7 +123,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt 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:[.IBase]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Test2 declared in .Test2' type=.Test2 origin=null value: GET_VAR 'j: .IBase declared in .Test2.' type=.IBase origin=null PROPERTY name:j visibility:public modality:FINAL [var] @@ -155,7 +155,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt BLOCK_BODY CALL 'public abstract fun foo (a: A of .IBase, b: B of .IBase.foo): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.foo' type=.Test2 origin=null a: GET_VAR 'a: kotlin.String declared in .Test2.foo' type=kotlin.String origin=null b: GET_VAR 'b: B of .Test2.foo declared in .Test2.foo' type=B of .Test2.foo origin=null @@ -170,7 +170,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt RETURN type=kotlin.Nothing from='public open fun (): kotlin.collections.Map.IBase, C of .IBase.>? declared in .Test2' CALL 'public abstract fun (): kotlin.collections.Map.IBase, C of .IBase.>? declared in .IBase' type=kotlin.collections.Map.Test2.>? origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [var] FUN DELEGATED_MEMBER name: visibility:public modality:OPEN ($this:.Test2) returnType:D of .IBase.? @@ -183,7 +183,7 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt RETURN type=kotlin.Nothing from='public open fun (): D of .IBase.? declared in .Test2' CALL 'public abstract fun (): D of .IBase.? declared in .IBase' type=D of .Test2.? origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null FUN DELEGATED_MEMBER name: visibility:public modality:OPEN ($this:.Test2, :D of .Test2.?) returnType:kotlin.Unit correspondingProperty: PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [var] @@ -195,10 +195,10 @@ FILE fqName: fileName:/delegatedGenericImplementation.kt BLOCK_BODY CALL 'public abstract fun (: D of .IBase.?): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null : GET_VAR ': D of .Test2.? declared in .Test2.' type=D of .Test2.? origin=null - FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt index f734c592f27..2a87a8673c5 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.fir.txt @@ -200,7 +200,7 @@ FILE fqName: fileName:/delegatedImplementation.kt 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:[.IBase]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null value: GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[.IBase]' type=.BaseImpl FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.Test1, x:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit @@ -211,7 +211,7 @@ FILE fqName: fileName:/delegatedImplementation.kt VALUE_PARAMETER DELEGATED_MEMBER name:s index:1 type:kotlin.String BLOCK_BODY CALL 'public abstract fun foo (x: kotlin.Int, s: kotlin.String): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test1 declared in .Test1.foo' type=.Test1 origin=null x: GET_VAR 'x: kotlin.Int declared in .Test1.foo' type=kotlin.Int origin=null s: GET_VAR 's: kotlin.String declared in .Test1.foo' type=kotlin.String origin=null @@ -222,7 +222,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.Int declared in .Test1' CALL 'public abstract fun bar (): kotlin.Int declared in .IBase' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test1 declared in .Test1.bar' type=.Test1 origin=null FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN <> ($this:.Test1) returnType:kotlin.Unit overridden: @@ -230,9 +230,9 @@ FILE fqName: fileName:/delegatedImplementation.kt $this: VALUE_PARAMETER DELEGATED_MEMBER name: type:.Test1 BLOCK_BODY CALL 'public abstract fun qux (): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test1 declared in .Test1.qux' type=.Test1 origin=null - FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -252,10 +252,10 @@ FILE fqName: fileName:/delegatedImplementation.kt 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:[.IBase; .IOther]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Test2 declared in .Test2' type=.Test2 origin=null value: GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[.IBase]' type=.BaseImpl - SET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Test2 declared in .Test2' type=.Test2 origin=null value: CALL 'public final fun otherImpl (x0: kotlin.String, y0: kotlin.Int): .IOther declared in ' type=.IOther origin=null x0: CONST String type=kotlin.String value="" @@ -268,7 +268,7 @@ FILE fqName: fileName:/delegatedImplementation.kt VALUE_PARAMETER DELEGATED_MEMBER name:s index:1 type:kotlin.String BLOCK_BODY CALL 'public abstract fun foo (x: kotlin.Int, s: kotlin.String): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.foo' type=.Test2 origin=null x: GET_VAR 'x: kotlin.Int declared in .Test2.foo' type=kotlin.Int origin=null s: GET_VAR 's: kotlin.String declared in .Test2.foo' type=kotlin.String origin=null @@ -279,7 +279,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun bar (): kotlin.Int declared in .Test2' CALL 'public abstract fun bar (): kotlin.Int declared in .IBase' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.bar' type=.Test2 origin=null FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN <> ($this:.Test2) returnType:kotlin.Unit overridden: @@ -287,9 +287,9 @@ FILE fqName: fileName:/delegatedImplementation.kt $this: VALUE_PARAMETER DELEGATED_MEMBER name: type:.Test2 BLOCK_BODY CALL 'public abstract fun qux (): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final]' type=.IBase origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final]' type=.IBase origin=null receiver: GET_VAR ': .Test2 declared in .Test2.qux' type=.Test2 origin=null - FIELD DELEGATE name:$$delegate_0 type:.IBase visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IBase visibility:local [final] PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [val] FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.Test2) returnType:kotlin.String correspondingProperty: PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [val] @@ -299,7 +299,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): kotlin.String declared in .Test2' CALL 'public abstract fun (): kotlin.String declared in .IOther' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=.IOther origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=.IOther origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null PROPERTY DELEGATED_MEMBER name:y visibility:public modality:OPEN [var] FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.Test2) returnType:kotlin.Int @@ -310,7 +310,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .Test2' CALL 'public abstract fun (): kotlin.Int declared in .IOther' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=.IOther origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=.IOther origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.Test2, :kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY DELEGATED_MEMBER name:y visibility:public modality:OPEN [var] @@ -320,7 +320,7 @@ FILE fqName: fileName:/delegatedImplementation.kt VALUE_PARAMETER DELEGATED_MEMBER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public abstract fun (: kotlin.Int): kotlin.Unit declared in .IOther' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=.IOther origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=.IOther origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null : GET_VAR ': kotlin.Int declared in .Test2.' type=kotlin.Int origin=null PROPERTY DELEGATED_MEMBER name:z1 visibility:public modality:OPEN [val] @@ -332,7 +332,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .Test2' CALL 'public abstract fun (): kotlin.Int declared in .IOther' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=.IOther origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=.IOther origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null PROPERTY DELEGATED_MEMBER name:z2 visibility:public modality:OPEN [var] FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.Test2) returnType:kotlin.Int @@ -343,7 +343,7 @@ FILE fqName: fileName:/delegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .Test2' CALL 'public abstract fun (): kotlin.Int declared in .IOther' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=.IOther origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=.IOther origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:.Test2, :kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY DELEGATED_MEMBER name:z2 visibility:public modality:OPEN [var] @@ -353,10 +353,10 @@ FILE fqName: fileName:/delegatedImplementation.kt VALUE_PARAMETER DELEGATED_MEMBER name: index:0 type:kotlin.Int BLOCK_BODY CALL 'public abstract fun (: kotlin.Int): kotlin.Unit declared in .IOther' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final]' type=.IOther origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final]' type=.IOther origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null : GET_VAR ': kotlin.Int declared in .Test2.' type=kotlin.Int origin=null - FIELD DELEGATE name:$$delegate_1 type:.IOther visibility:local [final] + FIELD DELEGATE name:<$$delegate_1> type:.IOther visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.fir.txt b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.fir.txt index b6a1c6158fb..5f7530a15e4 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.fir.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.fir.txt @@ -53,7 +53,7 @@ FILE fqName: fileName:/delegatedImplementationWithExplicitOverride.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[.IFooBar]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFooBar visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFooBar visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .C declared in .C' type=.C origin=null value: GET_OBJECT 'CLASS OBJECT name:FooBarImpl modality:FINAL visibility:public superTypes:[.IFooBar]' type=.FooBarImpl FUN name:bar visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Unit @@ -67,9 +67,9 @@ FILE fqName: fileName:/delegatedImplementationWithExplicitOverride.kt $this: VALUE_PARAMETER DELEGATED_MEMBER name: type:.C BLOCK_BODY CALL 'public abstract fun foo (): kotlin.Unit declared in .IFooBar' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFooBar visibility:local [final]' type=.IFooBar origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFooBar visibility:local [final]' type=.IFooBar origin=null receiver: GET_VAR ': .C declared in .C.foo' type=.C origin=null - FIELD DELEGATE name:$$delegate_0 type:.IFooBar visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IFooBar visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt index b5deaa2de8b..d33b0a142ee 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.fir.txt @@ -123,7 +123,7 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestJFoo modality:FINAL visibility:public superTypes:[.IFoo]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .TestJFoo declared in .TestJFoo' type=.TestJFoo origin=null value: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .JFoo' type=.JFoo origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.TestJFoo) returnType:kotlin.String @@ -133,9 +133,9 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in .TestJFoo' CALL 'public abstract fun foo (): kotlin.String declared in .IFoo' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=.IFoo origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=.IFoo origin=null receiver: GET_VAR ': .TestJFoo declared in .TestJFoo.foo' type=.TestJFoo origin=null - FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -155,7 +155,7 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK1 modality:FINAL visibility:public superTypes:[.IFoo]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .TestK1 declared in .TestK1' type=.TestK1 origin=null value: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K1' type=.K1 origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.TestK1) returnType:kotlin.String @@ -165,9 +165,9 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in .TestK1' CALL 'public abstract fun foo (): kotlin.String declared in .IFoo' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=.IFoo origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=.IFoo origin=null receiver: GET_VAR ': .TestK1 declared in .TestK1.foo' type=.TestK1 origin=null - FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -187,7 +187,7 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK2 modality:FINAL visibility:public superTypes:[.IFoo]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .TestK2 declared in .TestK2' type=.TestK2 origin=null value: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K2' type=.K2 origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.TestK2) returnType:kotlin.String @@ -197,9 +197,9 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in .TestK2' CALL 'public abstract fun foo (): kotlin.String declared in .IFoo' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=.IFoo origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=.IFoo origin=null receiver: GET_VAR ': .TestK2 declared in .TestK2.foo' type=.TestK2 origin=null - FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -219,7 +219,7 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK3 modality:FINAL visibility:public superTypes:[.IFoo]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .TestK3 declared in .TestK3' type=.TestK3 origin=null value: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K3' type=.K3 origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.TestK3) returnType:kotlin.String @@ -229,9 +229,9 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in .TestK3' CALL 'public abstract fun foo (): kotlin.String declared in .IFoo' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=.IFoo origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=.IFoo origin=null receiver: GET_VAR ': .TestK3 declared in .TestK3.foo' type=.TestK3 origin=null - FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -251,7 +251,7 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK4 modality:FINAL visibility:public superTypes:[.IFoo]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .TestK4 declared in .TestK4' type=.TestK4 origin=null value: CONSTRUCTOR_CALL 'public constructor () [primary] declared in .K4' type=.K4 origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.TestK4) returnType:kotlin.String @@ -261,9 +261,9 @@ FILE fqName: fileName:/implicitNotNullOnDelegatedImplementation.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in .TestK4' CALL 'public abstract fun foo (): kotlin.String declared in .IFoo' type=kotlin.String origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final]' type=.IFoo origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final]' type=.IFoo origin=null receiver: GET_VAR ': .TestK4 declared in .TestK4.foo' type=.TestK4 origin=null - FIELD DELEGATE name:$$delegate_0 type:.IFoo visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IFoo visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/kt35550.fir.txt b/compiler/testData/ir/irText/declarations/kt35550.fir.txt index d1c633ffb45..26a573ae014 100644 --- a/compiler/testData/ir/irText/declarations/kt35550.fir.txt +++ b/compiler/testData/ir/irText/declarations/kt35550.fir.txt @@ -30,7 +30,7 @@ FILE fqName: fileName:/kt35550.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[.I]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.I visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.I visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .A declared in .A' type=.A origin=null value: GET_VAR 'i: .I declared in .A.' type=.I origin=null PROPERTY DELEGATED_MEMBER name:id visibility:public modality:OPEN [val] @@ -44,9 +44,9 @@ FILE fqName: fileName:/kt35550.kt RETURN type=kotlin.Nothing from='public open fun (): T of .I. declared in .A' CALL 'public open fun (): T of .I. declared in .I' type=T of .A. origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.I visibility:local [final]' type=.I origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.I visibility:local [final]' type=.I origin=null receiver: GET_VAR ': .A declared in .A.' type=.A origin=null - FIELD DELEGATE name:$$delegate_0 type:.I visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.I visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.fir.txt b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.fir.txt index d2cc97ac35d..f7603cb53f4 100644 --- a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.fir.txt @@ -35,7 +35,7 @@ FILE fqName: fileName:/delegatedMembers.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[.IBase.Test>]' - SET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test> visibility:local [final]' type=kotlin.Unit origin=EQ + SET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test> visibility:local [final]' type=kotlin.Unit origin=EQ receiver: GET_VAR ': .Test.Test> declared in .Test' type=.Test.Test> origin=null value: GET_VAR 'impl: .IBase.Test> declared in .Test.' type=.IBase.Test> origin=null FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:.Test.Test>, x:kotlin.Int) returnType:kotlin.Unit @@ -45,7 +45,7 @@ FILE fqName: fileName:/delegatedMembers.kt VALUE_PARAMETER DELEGATED_MEMBER name:x index:0 type:kotlin.Int BLOCK_BODY CALL 'public abstract fun foo (x: kotlin.Int): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test> visibility:local [final]' type=.IBase.Test> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test> visibility:local [final]' type=.IBase.Test> origin=null receiver: GET_VAR ': .Test.Test> declared in .Test.foo' type=.Test.Test> origin=null x: GET_VAR 'x: kotlin.Int declared in .Test.foo' type=kotlin.Int origin=null PROPERTY DELEGATED_MEMBER name:bar visibility:public modality:OPEN [val] @@ -57,7 +57,7 @@ FILE fqName: fileName:/delegatedMembers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun (): kotlin.Int declared in .Test' CALL 'public abstract fun (): kotlin.Int declared in .IBase' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test> visibility:local [final]' type=.IBase.Test> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test> visibility:local [final]' type=.IBase.Test> origin=null receiver: GET_VAR ': .Test.Test> declared in .Test.' type=.Test.Test> origin=null FUN DELEGATED_MEMBER name:qux visibility:public modality:OPEN ($this:.Test.Test>, t:TT of .Test, x:X of .Test.qux) returnType:kotlin.Unit overridden: @@ -69,11 +69,11 @@ FILE fqName: fileName:/delegatedMembers.kt BLOCK_BODY CALL 'public abstract fun qux (t: T of .IBase, x: X of .IBase.qux): kotlin.Unit declared in .IBase' type=kotlin.Unit origin=null : - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.IBase.Test> visibility:local [final]' type=.IBase.Test> origin=null + $this: GET_FIELD 'FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test> visibility:local [final]' type=.IBase.Test> origin=null receiver: GET_VAR ': .Test.Test> declared in .Test.qux' type=.Test.Test> origin=null t: GET_VAR 't: TT of .Test declared in .Test.qux' type=TT of .Test origin=null x: GET_VAR 'x: X of .Test.qux declared in .Test.qux' type=X of .Test.qux origin=null - FIELD DELEGATE name:$$delegate_0 type:.IBase.Test> visibility:local [final] + FIELD DELEGATE name:<$$delegate_0> type:.IBase.Test> visibility:local [final] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any