PSI2IR: KT-40499 Fix delegated property desugaring
No type arguments were provided for property reference inside delegated property accessors.
This commit is contained in:
+5
@@ -314,6 +314,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
runTest("compiler/testData/ir/irText/declarations/fileWithTypeAliasesOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericDelegatedProperty.kt")
|
||||
public void testGenericDelegatedProperty() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/genericDelegatedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceProperties.kt")
|
||||
public void testInterfaceProperties() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/interfaceProperties.kt");
|
||||
|
||||
+18
-19
@@ -62,6 +62,7 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D
|
||||
|
||||
val irDelegate = irProperty.backingField!!
|
||||
|
||||
val propertyTypeArguments = propertyDescriptor.typeParameters.associateWith { it.defaultType }
|
||||
val thisClass = propertyDescriptor.containingDeclaration as? ClassDescriptor
|
||||
val delegateReceiverValue = createBackingFieldValueForDelegate(irDelegate.symbol, thisClass, ktDelegate, propertyDescriptor)
|
||||
val getterDescriptor = propertyDescriptor.getter!!
|
||||
@@ -69,7 +70,7 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D
|
||||
generateDelegatedPropertyGetterBody(
|
||||
irGetter,
|
||||
ktDelegate, getterDescriptor, delegateReceiverValue,
|
||||
createCallableReference(ktDelegate, kPropertyType, propertyDescriptor, irGetter.symbol)
|
||||
createPropertyReference(ktDelegate, kPropertyType, propertyDescriptor, irGetter.symbol, propertyTypeArguments)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -79,7 +80,7 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D
|
||||
generateDelegatedPropertySetterBody(
|
||||
irSetter,
|
||||
ktDelegate, setterDescriptor, delegateReceiverValue,
|
||||
createCallableReference(ktDelegate, kPropertyType, propertyDescriptor, irSetter.symbol)
|
||||
createPropertyReference(ktDelegate, kPropertyType, propertyDescriptor, irSetter.symbol, propertyTypeArguments)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -161,7 +162,12 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D
|
||||
val statementGenerator = createBodyGenerator(scopeOwner).createStatementGenerator()
|
||||
val provideDelegateCall = statementGenerator.pregenerateCall(provideDelegateResolvedCall)
|
||||
provideDelegateCall.setExplicitReceiverValue(OnceExpressionValue(irDelegateInitializer.expression))
|
||||
provideDelegateCall.irValueArgumentsByIndex[1] = createCallableReference(ktDelegate, kPropertyType, property, scopeOwner)
|
||||
provideDelegateCall.irValueArgumentsByIndex[1] =
|
||||
createPropertyReference(
|
||||
ktDelegate, kPropertyType, property, scopeOwner,
|
||||
null // we don't know type arguments at this time; see also KT-24643.
|
||||
)
|
||||
|
||||
val irProvideDelegate = CallGenerator(statementGenerator).generateCall(
|
||||
ktDelegate.startOffsetSkippingComments, ktDelegate.endOffset, provideDelegateCall
|
||||
)
|
||||
@@ -200,27 +206,20 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D
|
||||
}
|
||||
}
|
||||
|
||||
private fun createCallableReference(
|
||||
ktElement: KtElement,
|
||||
type: KotlinType,
|
||||
referencedDescriptor: CallableDescriptor,
|
||||
statementGenerator: StatementGenerator
|
||||
): IrCallableReference<*> =
|
||||
ReflectionReferencesGenerator(statementGenerator).generateCallableReference(
|
||||
ktElement, type,
|
||||
referencedDescriptor,
|
||||
null, IrStatementOrigin.PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
)
|
||||
|
||||
private fun createCallableReference(
|
||||
private fun createPropertyReference(
|
||||
ktElement: KtElement,
|
||||
type: KotlinType,
|
||||
referencedDescriptor: VariableDescriptorWithAccessors,
|
||||
scopeOwner: IrSymbol
|
||||
scopeOwner: IrSymbol,
|
||||
typeArguments: Map<TypeParameterDescriptor, KotlinType>?
|
||||
): IrCallableReference<*> =
|
||||
createCallableReference(
|
||||
ktElement, type, referencedDescriptor,
|
||||
ReflectionReferencesGenerator(
|
||||
createBodyGenerator(scopeOwner).createStatementGenerator()
|
||||
).generateCallableReference(
|
||||
ktElement, type,
|
||||
referencedDescriptor,
|
||||
typeArguments,
|
||||
IrStatementOrigin.PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
)
|
||||
|
||||
private fun createLocalDelegatedPropertyReference(
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
FILE fqName:<root> fileName:/genericDelegatedProperty.kt
|
||||
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C<T of <root>.C>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.C<T of <root>.C> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegate
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Delegate [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Delegate, thisRef:kotlin.Any?, kProp:kotlin.Any?) returnType:kotlin.Int [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
|
||||
VALUE_PARAMETER name:thisRef index:0 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:kProp index:1 type:kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Delegate'
|
||||
CONST Int type=kotlin.Int value=42
|
||||
FUN name:setValue visibility:public modality:FINAL <> ($this:<root>.Delegate, thisRef:kotlin.Any?, kProp:kotlin.Any?, newValue:kotlin.Int) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
|
||||
VALUE_PARAMETER name:thisRef index:0 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:kProp index:1 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:newValue index:2 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
PROPERTY name:genericDelegatedProperty visibility:public modality:FINAL [delegated,var]
|
||||
FIELD PROPERTY_DELEGATE name:genericDelegatedProperty$delegate type:<root>.Delegate visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Delegate
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-genericDelegatedProperty> visibility:public modality:FINAL <T> ($receiver:<root>.C<T of <root>.<get-genericDelegatedProperty>>) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:genericDelegatedProperty visibility:public modality:FINAL [delegated,var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.C<T of <root>.<get-genericDelegatedProperty>>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-genericDelegatedProperty> <T> (): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Delegate' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:genericDelegatedProperty$delegate type:<root>.Delegate visibility:private [final,static]' type=<root>.Delegate origin=null
|
||||
thisRef: GET_VAR '<this>: <root>.C<T of <root>.<get-genericDelegatedProperty>> declared in <root>.<get-genericDelegatedProperty>' type=<root>.C<T of <root>.<get-genericDelegatedProperty>> origin=null
|
||||
kProp: PROPERTY_REFERENCE 'public final genericDelegatedProperty: kotlin.Int [delegated,var]' field=null getter='public final fun <get-genericDelegatedProperty> <T> (): kotlin.Int declared in <root>' setter='public final fun <set-genericDelegatedProperty> <T> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KMutableProperty1<<root>.C<T of <root>.<get-genericDelegatedProperty>>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: <none>
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-genericDelegatedProperty> visibility:public modality:FINAL <T> ($receiver:<root>.C<T of <root>.<get-genericDelegatedProperty>>, <set-?>:kotlin.Int) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:genericDelegatedProperty visibility:public modality:FINAL [delegated,var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.C<T of <root>.<get-genericDelegatedProperty>>
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>.Delegate' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:genericDelegatedProperty$delegate type:<root>.Delegate visibility:private [final,static]' type=<root>.Delegate origin=null
|
||||
thisRef: GET_VAR '<this>: <root>.C<T of <root>.<get-genericDelegatedProperty>> declared in <root>.<set-genericDelegatedProperty>' type=<root>.C<T of <root>.<get-genericDelegatedProperty>> origin=null
|
||||
kProp: PROPERTY_REFERENCE 'public final genericDelegatedProperty: kotlin.Int [delegated,var]' field=null getter='public final fun <get-genericDelegatedProperty> <T> (): kotlin.Int declared in <root>' setter='public final fun <set-genericDelegatedProperty> <T> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KMutableProperty1<<root>.C<T of <root>.<get-genericDelegatedProperty>>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: <none>
|
||||
newValue: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-genericDelegatedProperty>' type=kotlin.Int origin=null
|
||||
@@ -0,0 +1,8 @@
|
||||
class C<T>
|
||||
|
||||
object Delegate {
|
||||
operator fun getValue(thisRef: Any?, kProp: Any?) = 42
|
||||
operator fun setValue(thisRef: Any?, kProp: Any? , newValue: Int) {}
|
||||
}
|
||||
|
||||
var <T> C<T>.genericDelegatedProperty by Delegate
|
||||
@@ -0,0 +1,81 @@
|
||||
FILE fqName:<root> fileName:/genericDelegatedProperty.kt
|
||||
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C<T of <root>.C>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.C<T of <root>.C> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegate
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Delegate [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:getValue visibility:public modality:FINAL <> ($this:<root>.Delegate, thisRef:kotlin.Any?, kProp:kotlin.Any?) returnType:kotlin.Int [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
|
||||
VALUE_PARAMETER name:thisRef index:0 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:kProp index:1 type:kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Delegate'
|
||||
CONST Int type=kotlin.Int value=42
|
||||
FUN name:setValue visibility:public modality:FINAL <> ($this:<root>.Delegate, thisRef:kotlin.Any?, kProp:kotlin.Any?, newValue:kotlin.Int) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Delegate
|
||||
VALUE_PARAMETER name:thisRef index:0 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:kProp index:1 type:kotlin.Any?
|
||||
VALUE_PARAMETER name:newValue index:2 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
PROPERTY name:genericDelegatedProperty visibility:public modality:FINAL [delegated,var]
|
||||
FIELD PROPERTY_DELEGATE name:genericDelegatedProperty$delegate type:<root>.Delegate visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Delegate
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-genericDelegatedProperty> visibility:public modality:FINAL <T> ($receiver:<root>.C<T of <root>.<get-genericDelegatedProperty>>) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:genericDelegatedProperty visibility:public modality:FINAL [delegated,var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.C<T of <root>.<get-genericDelegatedProperty>>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-genericDelegatedProperty> <T> (): kotlin.Int declared in <root>'
|
||||
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int [operator] declared in <root>.Delegate' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:genericDelegatedProperty$delegate type:<root>.Delegate visibility:private [final,static]' type=<root>.Delegate origin=null
|
||||
thisRef: GET_VAR '<this>: <root>.C<T of <root>.<get-genericDelegatedProperty>> declared in <root>.<get-genericDelegatedProperty>' type=<root>.C<T of <root>.<get-genericDelegatedProperty>> origin=null
|
||||
kProp: PROPERTY_REFERENCE 'public final genericDelegatedProperty: kotlin.Int [delegated,var]' field=null getter='public final fun <get-genericDelegatedProperty> <T> (): kotlin.Int declared in <root>' setter='public final fun <set-genericDelegatedProperty> <T> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KMutableProperty1<<root>.C<T of <root>.<get-genericDelegatedProperty>>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: T of <root>.<get-genericDelegatedProperty>
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-genericDelegatedProperty> visibility:public modality:FINAL <T> ($receiver:<root>.C<T of <root>.<set-genericDelegatedProperty>>, <set-?>:kotlin.Int) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:genericDelegatedProperty visibility:public modality:FINAL [delegated,var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.C<T of <root>.<set-genericDelegatedProperty>>
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <set-genericDelegatedProperty> <T> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>'
|
||||
CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>.Delegate' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:genericDelegatedProperty$delegate type:<root>.Delegate visibility:private [final,static]' type=<root>.Delegate origin=null
|
||||
thisRef: GET_VAR '<this>: <root>.C<T of <root>.<set-genericDelegatedProperty>> declared in <root>.<set-genericDelegatedProperty>' type=<root>.C<T of <root>.<set-genericDelegatedProperty>> origin=null
|
||||
kProp: PROPERTY_REFERENCE 'public final genericDelegatedProperty: kotlin.Int [delegated,var]' field=null getter='public final fun <get-genericDelegatedProperty> <T> (): kotlin.Int declared in <root>' setter='public final fun <set-genericDelegatedProperty> <T> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KMutableProperty1<<root>.C<T of <root>.<set-genericDelegatedProperty>>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: T of <root>.<set-genericDelegatedProperty>
|
||||
newValue: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-genericDelegatedProperty>' type=kotlin.Int origin=null
|
||||
@@ -79,6 +79,7 @@ FILE fqName:<root> fileName:/genericPropertyRef.kt
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:<root>.DVal visibility:private [final,static]' type=<root>.DVal origin=null
|
||||
t: GET_VAR '<this>: <root>.Value<T of <root>.<get-additionalText>> declared in <root>.<get-additionalText>' type=<root>.Value<T of <root>.<get-additionalText>> origin=null
|
||||
p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field=null getter='public final fun <get-additionalText> <T> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty1<<root>.Value<T of <root>.<get-additionalText>>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: T of <root>.<get-additionalText>
|
||||
PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val]
|
||||
FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:<root>.DVal visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
@@ -94,6 +95,7 @@ FILE fqName:<root> fileName:/genericPropertyRef.kt
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalValue$delegate type:<root>.DVal visibility:private [final,static]' type=<root>.DVal origin=null
|
||||
t: GET_VAR '<this>: <root>.Value<T of <root>.<get-additionalValue>> declared in <root>.<get-additionalValue>' type=<root>.Value<T of <root>.<get-additionalValue>> origin=null
|
||||
p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field=null getter='public final fun <get-additionalValue> <T> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty1<<root>.Value<T of <root>.<get-additionalValue>>, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: T of <root>.<get-additionalValue>
|
||||
CLASS CLASS name:DVal modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DVal
|
||||
CONSTRUCTOR visibility:public <> (kmember:kotlin.Any) returnType:<root>.DVal [primary]
|
||||
|
||||
@@ -377,3 +377,4 @@ FILE fqName:<root> fileName:/genericDelegatedDeepProperty.kt
|
||||
$this: GET_FIELD 'FIELD PROPERTY_DELEGATE name:additionalText$delegate type:<root>.additionalText$delegate.<no name provided><kotlin.Any?> visibility:private [final,static]' type=<root>.additionalText$delegate.<no name provided><kotlin.Any?> origin=null
|
||||
t: GET_VAR '<this>: <root>.Value<T of <root>.<get-additionalText>, <root>.CR<T of <root>.<get-additionalText>>> declared in <root>.<get-additionalText>' type=<root>.Value<T of <root>.<get-additionalText>, <root>.CR<T of <root>.<get-additionalText>>> origin=null
|
||||
p: PROPERTY_REFERENCE 'public final additionalText: <root>.P<T of <root>.<get-additionalText>, T of <root>.<get-additionalText>> [delegated,val]' field=null getter='public final fun <get-additionalText> <T> (): <root>.P<T of <root>.<get-additionalText>, T of <root>.<get-additionalText>> declared in <root>' setter=null type=kotlin.reflect.KProperty1<<root>.Value<T of <root>.<get-additionalText>, <root>.CR<T of <root>.<get-additionalText>>>, <root>.P<T of <root>.<get-additionalText>, T of <root>.<get-additionalText>>> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
<1>: T of <root>.<get-additionalText>
|
||||
|
||||
@@ -313,6 +313,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
runTest("compiler/testData/ir/irText/declarations/fileWithTypeAliasesOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericDelegatedProperty.kt")
|
||||
public void testGenericDelegatedProperty() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/genericDelegatedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceProperties.kt")
|
||||
public void testInterfaceProperties() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/declarations/interfaceProperties.kt");
|
||||
|
||||
Reference in New Issue
Block a user