diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.kt index 09535d63d34..80e82863ad2 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/simpleDelegatedToMap.kt @@ -1,5 +1,6 @@ class C(val map: MutableMap) { - var foo by map + // NB: this does not work because of @LowPriorityInOverloadResolution not deserialized (KT-37228) + var foo by map } -var bar by hashMapOf() \ No newline at end of file +var bar by hashMapOf() \ No newline at end of file diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt index 1391611dcae..e9df9354279 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/symbols/StandardClassIds.kt @@ -42,6 +42,12 @@ object StandardClassIds { val String = "String".baseId() val KProperty = "KProperty".reflectId() + val KProperty0 = "KProperty0".reflectId() + val KMutableProperty0 = "KMutableProperty0".reflectId() + val KProperty1 = "KProperty1".reflectId() + val KMutableProperty1 = "KMutableProperty1".reflectId() + val KProperty2 = "KProperty2".reflectId() + val KMutableProperty2 = "KMutableProperty2".reflectId() val Comparable = "Comparable".baseId() val Number = "Number".baseId() diff --git a/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt index a19526b1319..e6c5e3819c2 100644 --- a/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt +++ b/compiler/fir/raw-fir/fir-common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt @@ -36,8 +36,7 @@ import org.jetbrains.kotlin.fir.types.FirUserTypeRef import org.jetbrains.kotlin.fir.types.builder.buildImplicitTypeRef import org.jetbrains.kotlin.fir.types.builder.buildTypeProjectionWithVariance import org.jetbrains.kotlin.fir.types.builder.buildUserTypeRef -import org.jetbrains.kotlin.fir.types.impl.FirImplicitKPropertyTypeRef -import org.jetbrains.kotlin.fir.types.impl.FirQualifierPartImpl +import org.jetbrains.kotlin.fir.types.impl.* import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.Variance @@ -325,6 +324,7 @@ fun FirPropertyBuilder.generateAccessorsByDelegate( } else buildConstExpression(null, FirConstKind.Null, null) + val isVar = this@generateAccessorsByDelegate.isVar fun propertyRef() = buildCallableReferenceAccess { source = delegateBuilder.source calleeReference = buildResolvedNamedReference { @@ -332,7 +332,23 @@ fun FirPropertyBuilder.generateAccessorsByDelegate( name = this@generateAccessorsByDelegate.name resolvedSymbol = this@generateAccessorsByDelegate.symbol } - typeRef = FirImplicitKPropertyTypeRef(null, ConeStarProjection) + typeRef = when { + !member && !extension -> if (isVar) { + FirImplicitKMutableProperty0TypeRef(null, ConeStarProjection) + } else { + FirImplicitKProperty0TypeRef(null, ConeStarProjection) + } + member && extension -> if (isVar) { + FirImplicitKMutableProperty2TypeRef(null, ConeStarProjection, ConeStarProjection, ConeStarProjection) + } else { + FirImplicitKProperty2TypeRef(null, ConeStarProjection, ConeStarProjection, ConeStarProjection) + } + else -> if (isVar) { + FirImplicitKMutableProperty1TypeRef(null, ConeStarProjection, ConeStarProjection) + } else { + FirImplicitKProperty1TypeRef(null, ConeStarProjection, ConeStarProjection) + } + } } delegateBuilder.delegateProvider = if (stubMode) buildExpressionStub() else buildFunctionCall { 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 0ce26da5f5e..2d200529d99 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 @@ -31,6 +31,7 @@ import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef import org.jetbrains.kotlin.fir.types.builder.buildImplicitTypeRef import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef +import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl import org.jetbrains.kotlin.fir.visitors.* import org.jetbrains.kotlin.name.Name @@ -139,6 +140,45 @@ class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransformer) } } + private fun FirFunctionCall.replacePropertyReferenceTypeInDelegateAccessors(property: FirProperty) { + // var someProperty: SomeType + // get() = delegate.getValue(thisRef, kProperty: KProperty0/1/2<..., SomeType>) + // set() = delegate.getValue(thisRef, kProperty: KProperty0/1/2<..., SomeType>, value) + val propertyReferenceAccess = argumentMapping?.keys?.toList()?.getOrNull(1) as? FirCallableReferenceAccess ?: return + val typeRef = propertyReferenceAccess.typeRef + if (typeRef is FirResolvedTypeRef && property.returnTypeRef is FirResolvedTypeRef) { + val typeArguments = (typeRef.type as ConeClassLikeType).typeArguments + val extensionType = property.receiverTypeRef?.coneTypeSafe() + propertyReferenceAccess.replaceTypeRef( + buildResolvedTypeRef { + source = typeRef.source + annotations.addAll(typeRef.annotations) + type = (typeRef.type as ConeClassLikeType).lookupTag.constructClassType( + typeArguments.mapIndexed { index, argument -> + when (index) { + typeArguments.lastIndex -> property.returnTypeRef.coneTypeUnsafe() + 0 -> containingClass?.let { containingClass -> + containingClass.symbol.constructType( + Array(containingClass.typeParameters.size) { ConeStarProjection }, isNullable = false + ) + } ?: extensionType + else -> extensionType + } ?: argument + }.toTypedArray(), + isNullable = false + ) + } + ) + } + } + + private fun replacePropertyReferenceTypeInDelegateAccessors(property: FirProperty) { + (property.getter?.body?.statements?.singleOrNull() as? FirReturnExpression)?.let { returnExpression -> + (returnExpression.result as? FirFunctionCall)?.replacePropertyReferenceTypeInDelegateAccessors(property) + } + (property.setter?.body?.statements?.singleOrNull() as? FirFunctionCall)?.replacePropertyReferenceTypeInDelegateAccessors(property) + } + private fun transformPropertyWithDelegate(property: FirProperty) { property.transformDelegate(transformer, ResolutionMode.ContextDependent) @@ -165,6 +205,9 @@ class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransformer) val declarationCompletionResultsWriter = FirDeclarationCompletionResultsWriter(finalSubstitutor) property.transformSingle(declarationCompletionResultsWriter, null) } + if (property.delegateFieldSymbol != null) { + replacePropertyReferenceTypeInDelegateAccessors(property) + } property.transformOtherChildren(transformer, ResolutionMode.ContextIndependent) } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt index 72c86491723..1a0bd55b35e 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/impl/FirImplicitBuiltinTypeRef.kt @@ -87,3 +87,45 @@ class FirImplicitKPropertyTypeRef( source: FirSourceElement?, typeArgument: ConeTypeProjection ) : FirImplicitBuiltinTypeRef(source, StandardClassIds.KProperty, arrayOf(typeArgument)) + +class FirImplicitKProperty0TypeRef( + source: FirSourceElement?, + propertyTypeArgument: ConeTypeProjection +) : FirImplicitBuiltinTypeRef(source, StandardClassIds.KProperty0, arrayOf(propertyTypeArgument)) + +class FirImplicitKMutableProperty0TypeRef( + source: FirSourceElement?, + propertyTypeArgument: ConeTypeProjection +) : FirImplicitBuiltinTypeRef(source, StandardClassIds.KMutableProperty0, arrayOf(propertyTypeArgument)) + +class FirImplicitKProperty1TypeRef( + source: FirSourceElement?, + receiverTypeArgument: ConeTypeProjection, + propertyTypeArgument: ConeTypeProjection +) : FirImplicitBuiltinTypeRef(source, StandardClassIds.KProperty1, arrayOf(receiverTypeArgument, propertyTypeArgument)) + +class FirImplicitKMutableProperty1TypeRef( + source: FirSourceElement?, + receiverTypeArgument: ConeTypeProjection, + propertyTypeArgument: ConeTypeProjection +) : FirImplicitBuiltinTypeRef(source, StandardClassIds.KMutableProperty1, arrayOf(receiverTypeArgument, propertyTypeArgument)) + +class FirImplicitKProperty2TypeRef( + source: FirSourceElement?, + dispatchReceiverTypeArgument: ConeTypeProjection, + extensionReceiverTypeArgument: ConeTypeProjection, + propertyTypeArgument: ConeTypeProjection +) : FirImplicitBuiltinTypeRef( + source, StandardClassIds.KProperty2, + arrayOf(dispatchReceiverTypeArgument, extensionReceiverTypeArgument, propertyTypeArgument) +) + +class FirImplicitKMutableProperty2TypeRef( + source: FirSourceElement?, + dispatchReceiverTypeArgument: ConeTypeProjection, + extensionReceiverTypeArgument: ConeTypeProjection, + propertyTypeArgument: ConeTypeProjection +) : FirImplicitBuiltinTypeRef( + source, StandardClassIds.KMutableProperty2, + arrayOf(dispatchReceiverTypeArgument, extensionReceiverTypeArgument, propertyTypeArgument) +) diff --git a/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt b/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt index 009457f0ff9..de7494fcfcb 100644 --- a/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt +++ b/compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.fir.kt @@ -33,8 +33,8 @@ operator fun CustomDelegate3.setValue(thisRef: Any?, prop: KProperty<*>, value: class Example { - var a by CustomDelegate() - val aval by CustomDelegate() + var a by CustomDelegate() + val aval by CustomDelegate() var b by OkDelegate() var c by CustomDelegate2() var d by CustomDelegate3() diff --git a/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt b/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt index c1a3bdc1a65..f4bdfdadd4c 100644 --- a/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/options/targets/field.fir.kt @@ -28,7 +28,7 @@ abstract class My(@Field arg: Int, @Field val w: Int) { fun foo() {} @Field - val v: Int by Delegates.lazy { 42 } + val v: Int by Delegates.lazy { 42 } } enum class Your { diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.fir.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.fir.kt index 7ee3c670c3b..d9e888fbb9a 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.fir.kt +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.fir.kt @@ -29,7 +29,7 @@ private fun lazy(init: () -> T): kotlin.Lazy { } object DefaultHttpClientWithBy : HttpClient by client { - val client by lazy { HttpClientImpl() } + val client by lazy { HttpClientImpl() } } object DefaultFqHttpClient : HttpClient by DefaultFqHttpClient.client { diff --git a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt index 04ce94737f8..9e97918528a 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_3.fir.kt @@ -11,7 +11,7 @@ fun test() { const val a3 = 0 lateinit val a4 = 0 val a5 by Delegate() - val a6 by Delegate() + val a6 by Delegate() } class Delegate { diff --git a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt index 43a52b7b1b5..106619857c6 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/localVariablesWithTypeParameters_1_4.fir.kt @@ -11,7 +11,7 @@ fun test() { const val a3 = 0 lateinit val a4 = 0 val a5 by Delegate() - val a6 by Delegate() + val a6 by Delegate() } class Delegate { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.fir.kt index 8a6d09a8a9e..12ee9c9e9e1 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.fir.kt @@ -5,10 +5,10 @@ import kotlin.reflect.KProperty class A class D { - val c: Int by IncorrectThis() + val c: Int by IncorrectThis() } -val cTopLevel: Int by IncorrectThis() +val cTopLevel: Int by IncorrectThis() class IncorrectThis { fun get(t: Any?, p: KProperty<*>): Int { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt index e34203d0b3c..a2b3d2a91a0 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.fir.kt @@ -4,10 +4,10 @@ package foo import kotlin.reflect.KProperty open class A { - val B.w: Int by MyProperty() + val B.w: Int by MyProperty() } -val B.r: Int by MyProperty() +val B.r: Int by MyProperty() val A.e: Int by MyProperty() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.fir.kt index 8f2adfea2c3..1814104f163 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.fir.kt @@ -5,7 +5,7 @@ package test import first.* import second.* -val a12 by A() +val a12 by A() // FILE: first.kt package first diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/kt4640.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/kt4640.fir.kt index dbfc1239d50..beac5cea63f 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/kt4640.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/kt4640.fir.kt @@ -8,4 +8,4 @@ class ValueWrapper() fun setValue(v: Int) { backingValue = v } } -val foo by ValueWrapper() +val foo by ValueWrapper() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.fir.kt index 34e79520b60..270badeb52d 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.fir.kt @@ -1,3 +1,3 @@ -val a: Int by A() +val a: Int by A() class A diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt index ebe6e435f98..6e5547829ff 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.fir.kt @@ -5,7 +5,7 @@ import kotlin.reflect.KProperty class B { - val c by Delegate(ag) + val c by Delegate(ag) } class Delegate(val init: T) { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt index 03a654b3bac..516ff85718f 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.fir.kt @@ -5,5 +5,5 @@ object T1 { operator fun Long.getValue(receiver: String, p: Any): Double = 1.0 val String.test1 by 1 - val test2 by 1 + val test2 by 1 } diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt index 550fd8ef522..da6ca89dba2 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.fir.kt @@ -10,5 +10,5 @@ object T2 { operator fun Foo.getValue(receiver: String, p: Any?): T = TODO() val String.test1: String by delegate() - val test2: String by delegate() + val test2: String by delegate() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.fir.kt index 36cb8a7c3cd..db90e09363a 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.fir.kt @@ -4,12 +4,12 @@ import kotlin.reflect.KProperty -val a by a +val a by a val b by Delegate(b) -val c by d -val d by c +val c by d +val d by c class Delegate(i: Int) { operator fun getValue(t: Any?, p: KProperty<*>): Int { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt index 86c404b813b..811a7263d03 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.fir.kt @@ -5,7 +5,7 @@ import kotlin.reflect.KProperty val Int.a by Delegate(this) class A { - val Int.a by Delegate(this) + val Int.a by Delegate(this) } class Delegate(i: Int) { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt index 9a35ad515a4..3a826e00878 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.fir.kt @@ -4,7 +4,7 @@ import kotlin.reflect.KProperty class A { - var a: Int by Delegate() + var a: Int by Delegate() } var aTopLevel: Int by Delegate() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt index 04161d13bc0..405dee83558 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.fir.kt @@ -4,10 +4,10 @@ import kotlin.reflect.KProperty class A { - var a: Int by Delegate() + var a: Int by Delegate() } -var aTopLevel: Int by Delegate() +var aTopLevel: Int by Delegate() class Delegate { fun getValue(t: Nothing, p: KProperty<*>): Int { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.fir.kt index 5963ce7fcc7..7d9c4fed52b 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.fir.kt @@ -3,7 +3,7 @@ import kotlin.reflect.KProperty class A { - val c: Int by Delegate() + val c: Int by Delegate() } class Delegate { diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt index 4c101ed1aef..fc65950992f 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.fir.kt @@ -5,10 +5,10 @@ import kotlin.reflect.KProperty class A class B { - val b: Int by Delegate() + val b: Int by Delegate() } -val bTopLevel: Int by Delegate() +val bTopLevel: Int by Delegate() class C { val c: Int by Delegate() diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt index 2b5712dd009..8058a494f55 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.fir.kt @@ -4,10 +4,10 @@ import kotlin.reflect.KProperty class B { - val b: Int by Delegate() + val b: Int by Delegate() } -val bTopLevel: Int by Delegate() +val bTopLevel: Int by Delegate() class A diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.fir.kt index 3feab5ec632..1a8e7d9ffb3 100644 --- a/compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.fir.kt +++ b/compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.fir.kt @@ -3,10 +3,10 @@ import kotlin.reflect.KProperty class A { - val a: Int by Delegate() + val a: Int by Delegate() } -val aTopLevel: Int by Delegate() +val aTopLevel: Int by Delegate() class Delegate { fun getValue(t: Any?, p: KProperty<*>, a: Int): Int { diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.fir.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.fir.kt index 55e41e660c7..d032e8e90e3 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.fir.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.fir.kt @@ -5,9 +5,9 @@ import kotlin.reflect.KProperty operator fun Any.getValue(x: Any?, y: Any): Any = null!! class C { - val x by 1 + val x by 1 val `$$delegatedProperties`: Array> = null!! } -val x by 1 +val x by 1 val `$$delegatedProperties`: Array> = null!! diff --git a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.fir.kt b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.fir.kt index f444cae9c97..9818e905979 100644 --- a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.fir.kt +++ b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.fir.kt @@ -40,7 +40,7 @@ fun foo() { property1 = 1 val - propertyWithBy by lazy { 1 } + propertyWithBy by lazy { 1 } val propertyWithType: Int diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.fir.kt index fae7807c753..57a25830916 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.fir.kt @@ -19,5 +19,5 @@ public class J { // FILE: k.kt var A by J.staticNN -var B by J.staticN +var B by J.staticN var C by J.staticJ \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt index 9426f1ed15a..98914c36b4f 100644 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt +++ b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.fir.kt @@ -8,7 +8,7 @@ class Delegate { fun foo(): Int { val prop: Int by Delegate() - val prop2: Int by 123 + val prop2: Int by 123 val obj = object { fun v(): Int { diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt index d5adb56799b..658c6674f78 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt @@ -35,4 +35,4 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt index 5d9cceb1409..ff183afe3ed 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.txt @@ -97,7 +97,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in .Cell' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] annotations: A(x = 'test2.get') @@ -114,7 +114,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in .Cell' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:kotlin.Int @@ -122,5 +122,5 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit [operator] declared in .Cell' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:.Cell visibility:private [final,static]' type=.Cell origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE newValue: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index 053a6efb0fa..d0dc7c9042d 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -110,7 +110,7 @@ FILE fqName: fileName:/classLevelProperties.kt : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=null thisRef: GET_VAR ': .C declared in .C' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final] EXPRESSION_BODY @@ -124,7 +124,7 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .C' ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<*, *> origin=PROPERTY_REFERENCE_FOR_DELEGATE 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] $this: VALUE_PARAMETER name: type:.C @@ -132,7 +132,7 @@ FILE fqName: fileName:/classLevelProperties.kt BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<*, *> origin=PROPERTY_REFERENCE_FOR_DELEGATE 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 [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt index 41e21488833..5de09b19984 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/delegatedProperties.kt : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test1$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C CONSTRUCTOR visibility:public <> (map:kotlin.collections.MutableMap) returnType:.C [primary] @@ -55,7 +55,7 @@ FILE fqName: fileName:/delegatedProperties.kt : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test2$delegate type:kotlin.Lazy visibility:private [final]' type=kotlin.Lazy origin=null thisRef: GET_VAR ': .C declared in .C' type=.C origin=null - property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in .C' setter=null type=kotlin.reflect.KProperty1<.C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] FIELD PROPERTY_DELEGATE name:test3$delegate type:kotlin.collections.MutableMap visibility:private [final] EXPRESSION_BODY @@ -67,7 +67,7 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in .C' ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<*, *> origin=PROPERTY_REFERENCE_FOR_DELEGATE 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] $this: VALUE_PARAMETER name: type:.C @@ -75,7 +75,7 @@ FILE fqName: fileName:/delegatedProperties.kt BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR ': .C declared in .C' type=.C origin=null - PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in .C' setter='public final fun (: IrErrorType): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<*, *> origin=PROPERTY_REFERENCE_FOR_DELEGATE 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 [fake_override,operator] overridden: @@ -102,12 +102,12 @@ FILE fqName: fileName:/delegatedProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE GET_VAR ': IrErrorType declared in .' type=IrErrorType origin=null diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt index b166be6f531..7cb3d5e3d5a 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt @@ -86,7 +86,7 @@ FILE fqName: fileName:/packageLevelProperties.kt : kotlin.Int $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static]' type=kotlin.Lazy origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] FIELD PROPERTY_DELEGATE name:test8$delegate type:java.util.HashMap visibility:private [final,static] EXPRESSION_BODY @@ -99,12 +99,12 @@ FILE fqName: fileName:/packageLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:IrErrorType) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:IrErrorType BLOCK_BODY ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Null type=kotlin.Nothing? value=null - PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field=null getter='public final fun (): IrErrorType declared in ' setter='public final fun (: IrErrorType): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE GET_VAR ': IrErrorType declared in .' type=IrErrorType origin=null diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt index bef73d969b4..f8bb6e49d37 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.fir.txt @@ -52,7 +52,7 @@ FILE fqName: fileName:/differentReceivers.kt $receiver: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) [primary] declared in .MyClass' type=.MyClass origin=null value: CONST String type=kotlin.String value="O" host: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:testO visibility:public modality:FINAL [delegated,val] BLOCK_BODY @@ -60,7 +60,7 @@ FILE fqName: fileName:/differentReceivers.kt CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testO$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null receiver: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final testO: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:testK visibility:public modality:FINAL [delegated,val] FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] EXPRESSION_BODY @@ -72,7 +72,7 @@ FILE fqName: fileName:/differentReceivers.kt CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String [operator] declared in ' type=kotlin.String origin=null $receiver: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]' type=kotlin.String origin=null receiver: CONST Null type=kotlin.Nothing? value=null - p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:testOK visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:testOK type:kotlin.String visibility:private [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt index 0ba5d8769cd..ca9b0a65643 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.fir.txt @@ -91,7 +91,7 @@ FILE fqName: fileName:/member.kt $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: GET_VAR ': .Host declared in .Host' type=.Host origin=null - property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty1<*, *> origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Host) returnType:kotlin.String correspondingProperty: PROPERTY name:testMember visibility:public modality:FINAL [delegated,val] $this: VALUE_PARAMETER name: type:.Host @@ -100,7 +100,7 @@ FILE fqName: fileName:/member.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in .Delegate' type=kotlin.String origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testMember$delegate type:.Delegate visibility:private [final]' type=.Delegate origin=null thisRef: GET_VAR ': .Host declared in .Host' type=.Host origin=null - property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final testMember: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty1<.Host, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE 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/provideDelegate/memberExtension.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt index 3ce92d20f80..c42cb80b6b8 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.fir.txt @@ -62,7 +62,7 @@ FILE fqName: fileName:/memberExtension.kt $this: GET_VAR ': .Host declared in .Host' type=.Host origin=null $receiver: CONST String type=kotlin.String value="K" host: GET_VAR ': .Host declared in .Host' type=.Host origin=null - p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty2<*, *, *> origin=PROPERTY_REFERENCE_FOR_DELEGATE $this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host $receiver: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Host, $receiver:kotlin.String) returnType:kotlin.String @@ -75,7 +75,7 @@ FILE fqName: fileName:/memberExtension.kt $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:plusK$delegate type:.Host.StringDelegate visibility:private [final]' type=.Host.StringDelegate origin=null receiver: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host receiver: ERROR_CALL 'Unresolved reference: this@R|/Host.plusK|' type=kotlin.String - p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final plusK: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in .Host' setter=null type=kotlin.reflect.KProperty2<.Host, kotlin.String, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE $this: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host $receiver: GET_OBJECT 'CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Host PROPERTY name:ok visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt index ca074d00b39..11bb539222f 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.fir.txt @@ -85,7 +85,7 @@ FILE fqName: fileName:/topLevel.kt $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: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String correspondingProperty: PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val] BLOCK_BODY @@ -93,4 +93,4 @@ FILE fqName: fileName:/topLevel.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String [operator] declared in .Delegate' type=kotlin.String origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:testTopLevel$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + property: PROPERTY_REFERENCE 'public final testTopLevel: kotlin.String [delegated,val]' field=null getter='public final fun (): kotlin.String declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt index 58038a1bf03..564cbbe33fb 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.fir.txt @@ -78,7 +78,7 @@ FILE fqName: fileName:/genericPropertyRef.kt CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null t: ERROR_CALL 'Unresolved reference: this@R|/additionalText|' type=.Value.> - p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty1<.Value.>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val] FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static] @@ -94,7 +94,7 @@ FILE fqName: fileName:/genericPropertyRef.kt CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int [operator] declared in .DVal' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:.DVal visibility:private [final,static]' type=.DVal origin=null t: ERROR_CALL 'Unresolved reference: this@R|/additionalValue|' type=.Value.> - p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty1<.Value.>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: CLASS CLASS name:DVal modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.DVal diff --git a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt index e34a2c7eb17..4f7acc2c13f 100644 --- a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt @@ -199,7 +199,7 @@ FILE fqName: fileName:/propertyReferences.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int [operator] declared in .Delegate' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVal$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + kProp: PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field=null getter='public final fun (): kotlin.Int declared in ' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:kotlin.reflect.KProperty0 visibility:private [final,static] EXPRESSION_BODY @@ -220,7 +220,7 @@ FILE fqName: fileName:/propertyReferences.kt CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int [operator] declared in .Delegate' type=kotlin.Int origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var] VALUE_PARAMETER name: index:0 type:kotlin.Int @@ -228,7 +228,7 @@ FILE fqName: fileName:/propertyReferences.kt CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any, value: kotlin.Int): kotlin.Unit [operator] declared in .Delegate' type=kotlin.Unit origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:delegatedVar$delegate type:.Delegate visibility:private [final,static]' type=.Delegate origin=null thisRef: CONST Null type=kotlin.Nothing? value=null - kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field=null getter='public final fun (): kotlin.Int declared in ' setter='public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_delegatedVar type:kotlin.reflect.KMutableProperty0 visibility:private [final,static] diff --git a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt index a742954a310..79485ce4f28 100644 --- a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt +++ b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.fir.txt @@ -263,7 +263,7 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): T of . declared in .additionalText$delegate..deepO$delegate.' type=T of . origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:deepO$delegate type:.additionalText$delegate..deepO$delegate. visibility:private [final]' type=.additionalText$delegate..deepO$delegate. origin=null t: ERROR_CALL 'Unresolved reference: this@R|/anonymous.deepO|' type=.Value., .CR.>> - p: PROPERTY_REFERENCE 'private final deepO: T of . [delegated,val]' field=null getter='public final fun (): T of . declared in .additionalText$delegate.' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'private final deepO: T of . [delegated,val]' field=null getter='public final fun (): T of . declared in .additionalText$delegate.' setter=null type=kotlin.reflect.KProperty2<.Value., .CR.>>, .Value., .CR.>>, T of .> origin=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY name:deepK visibility:private modality:FINAL [delegated,val] FIELD PROPERTY_DELEGATE name:deepK$delegate type:.additionalText$delegate..deepK$delegate. visibility:private [final] EXPRESSION_BODY @@ -293,7 +293,7 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): T of . declared in .additionalText$delegate..deepK$delegate.' type=T of . origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:deepK$delegate type:.additionalText$delegate..deepK$delegate. visibility:private [final]' type=.additionalText$delegate..deepK$delegate. origin=null t: ERROR_CALL 'Unresolved reference: this@R|/anonymous.deepK|' type=.Value., .CR.>> - p: PROPERTY_REFERENCE 'private final deepK: T of . [delegated,val]' field=null getter='public final fun (): T of . declared in .additionalText$delegate.' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'private final deepK: T of . [delegated,val]' field=null getter='public final fun (): T of . declared in .additionalText$delegate.' setter=null type=kotlin.reflect.KProperty2<.Value., .CR.>>, .Value., .CR.>>, T of .> origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN name:getValue visibility:public modality:FINAL <> ($this:.additionalText$delegate., t:.Value., .CR.>>, p:kotlin.reflect.KProperty<*>) returnType:.P., T of .> $this: VALUE_PARAMETER name: type:.additionalText$delegate. VALUE_PARAMETER name:t index:0 type:.Value., .CR.>> @@ -319,5 +319,5 @@ FILE fqName: fileName:/genericDelegatedDeepProperty.kt CALL 'public final fun getValue (t: .Value., .CR.>>, p: kotlin.reflect.KProperty<*>): .P., T of .> declared in .additionalText$delegate.' type=.P., T of .> origin=null $this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:.additionalText$delegate. visibility:private [final,static]' type=.additionalText$delegate. origin=null t: ERROR_CALL 'Unresolved reference: this@R|/additionalText|' type=.Value., .CR.>> - p: PROPERTY_REFERENCE 'public final additionalText: .P., T of .> [delegated,val]' field=null getter='public final fun (): .P., T of .> declared in ' setter=null type=kotlin.reflect.KProperty<*> origin=PROPERTY_REFERENCE_FOR_DELEGATE + p: PROPERTY_REFERENCE 'public final additionalText: .P., T of .> [delegated,val]' field=null getter='public final fun (): .P., T of .> declared in ' setter=null type=kotlin.reflect.KProperty1<.Value., .CR.>>, .P., T of .>> origin=PROPERTY_REFERENCE_FOR_DELEGATE <1>: