FIR: partial implementation of delegate resolve #KT-32217 Fixed

This commit is contained in:
Mikhail Glukhikh
2019-07-11 19:21:11 +03:00
parent 63b7fa70f9
commit 213f951da3
56 changed files with 753 additions and 266 deletions
@@ -12,7 +12,9 @@ import org.jetbrains.kotlin.name.Name
object StandardClassIds { object StandardClassIds {
private val BASE_KOTLIN_PACKAGE = FqName("kotlin") private val BASE_KOTLIN_PACKAGE = FqName("kotlin")
private val BASE_REFLECT_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("reflect"))
private fun String.baseId() = ClassId(BASE_KOTLIN_PACKAGE, Name.identifier(this)) private fun String.baseId() = ClassId(BASE_KOTLIN_PACKAGE, Name.identifier(this))
private fun String.reflectId() = ClassId(BASE_REFLECT_PACKAGE, Name.identifier(this))
private fun Name.arrayId() = ClassId(Array.packageFqName, Name.identifier(identifier + Array.shortClassName.identifier)) private fun Name.arrayId() = ClassId(Array.packageFqName, Name.identifier(identifier + Array.shortClassName.identifier))
val Nothing = "Nothing".baseId() val Nothing = "Nothing".baseId()
@@ -33,6 +35,8 @@ object StandardClassIds {
val String = "String".baseId() val String = "String".baseId()
val KProperty = "KProperty".reflectId()
fun byName(name: String) = name.baseId() fun byName(name: String) = name.baseId()
val primitiveArrayTypeByElementType: Map<ClassId, ClassId> = mutableMapOf<ClassId, ClassId>().apply { val primitiveArrayTypeByElementType: Map<ClassId, ClassId> = mutableMapOf<ClassId, ClassId>().apply {
@@ -848,7 +848,7 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
} }
withIdentLevel { withIdentLevel {
generate(property.getter) property.getter?.let { generate(it) }
property.setter?.let { generate(it) } property.setter?.let { generate(it) }
} }
} }
@@ -107,7 +107,8 @@ fun FirNamedReference.toSymbol(declarationStorage: Fir2IrDeclarationStorage): Ir
is FirFunctionSymbol<*> -> return callableSymbol.toFunctionSymbol(declarationStorage) is FirFunctionSymbol<*> -> return callableSymbol.toFunctionSymbol(declarationStorage)
is FirPropertySymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage) is FirPropertySymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage)
is FirFieldSymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage) is FirFieldSymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage)
is FirBackingFieldSymbol -> return callableSymbol.toPropertyOrFieldSymbol(declarationStorage) is FirBackingFieldSymbol -> return callableSymbol.toBackingFieldSymbol(declarationStorage)
is FirDelegateFieldSymbol<*> -> return callableSymbol.toBackingFieldSymbol(declarationStorage)
is FirVariableSymbol<*> -> return callableSymbol.toValueSymbol(declarationStorage) is FirVariableSymbol<*> -> return callableSymbol.toValueSymbol(declarationStorage)
} }
} }
@@ -130,6 +131,10 @@ fun FirVariableSymbol<*>.toPropertyOrFieldSymbol(declarationStorage: Fir2IrDecla
return declarationStorage.getIrPropertyOrFieldSymbol(this) return declarationStorage.getIrPropertyOrFieldSymbol(this)
} }
fun FirVariableSymbol<*>.toBackingFieldSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbol {
return declarationStorage.getIrBackingFieldSymbol(this)
}
fun FirVariableSymbol<*>.toValueSymbol(declarationStorage: Fir2IrDeclarationStorage): IrValueSymbol { fun FirVariableSymbol<*>.toValueSymbol(declarationStorage: Fir2IrDeclarationStorage): IrValueSymbol {
return declarationStorage.getIrValueSymbol(this) return declarationStorage.getIrValueSymbol(this)
} }
@@ -541,6 +541,20 @@ class Fir2IrDeclarationStorage(
} }
} }
fun getIrBackingFieldSymbol(firVariableSymbol: FirVariableSymbol<*>): IrSymbol {
return when (val fir = firVariableSymbol.fir) {
is FirProperty -> {
val irProperty = getIrProperty(fir).apply {
setAndModifyParent(findIrParent(fir))
}
irSymbolTable.referenceField(irProperty.backingField!!.descriptor)
}
else -> {
getIrVariableSymbol(fir)
}
}
}
private fun getIrVariableSymbol(firVariable: FirVariable<*>): IrVariableSymbol { private fun getIrVariableSymbol(firVariable: FirVariable<*>): IrVariableSymbol {
val irDeclaration = localStorage.getVariable(firVariable) val irDeclaration = localStorage.getVariable(firVariable)
?: throw IllegalArgumentException("Cannot find variable ${firVariable.render()} in local storage") ?: throw IllegalArgumentException("Cannot find variable ${firVariable.render()} in local storage")
@@ -456,8 +456,37 @@ internal class Fir2IrVisitor(
} }
} }
private fun IrProperty.createBackingField(
property: FirProperty,
origin: IrDeclarationOrigin,
descriptor: PropertyDescriptor,
visibility: Visibility,
name: Name,
isFinal: Boolean,
firInitializerExpression: FirExpression?,
type: IrType? = null
): IrField {
val inferredType = type ?: firInitializerExpression!!.typeRef.toIrType(session, declarationStorage)
return symbolTable.declareField(
startOffset, endOffset, origin, descriptor, inferredType
) { symbol ->
IrFieldImpl(
startOffset, endOffset, origin, symbol,
name, inferredType,
visibility, isFinal = isFinal, isExternal = false,
isStatic = property.isStatic || parent !is IrClass
)
}.setParentByParentStack().withParent {
declarationStorage.enterScope(descriptor)
val initializerExpression = firInitializerExpression?.toIrExpression()
this.initializer = initializerExpression?.let { IrExpressionBodyImpl(it) }
declarationStorage.leaveScope(descriptor)
}
}
private fun IrProperty.setPropertyContent(descriptor: PropertyDescriptor, property: FirProperty): IrProperty { private fun IrProperty.setPropertyContent(descriptor: PropertyDescriptor, property: FirProperty): IrProperty {
val initializer = property.initializer val initializer = property.initializer
val delegate = property.delegate
val irParent = this.parent val irParent = this.parent
val type = property.returnTypeRef.toIrType(session, declarationStorage) val type = property.returnTypeRef.toIrType(session, declarationStorage)
// TODO: this checks are very preliminary, FIR resolve should determine backing field presence itself // TODO: this checks are very preliminary, FIR resolve should determine backing field presence itself
@@ -465,27 +494,20 @@ internal class Fir2IrVisitor(
if (initializer != null || property.getter is FirDefaultPropertyGetter || if (initializer != null || property.getter is FirDefaultPropertyGetter ||
property.isVar && property.setter is FirDefaultPropertySetter property.isVar && property.setter is FirDefaultPropertySetter
) { ) {
val backingOrigin = IrDeclarationOrigin.PROPERTY_BACKING_FIELD backingField = createBackingField(
backingField = symbolTable.declareField( property, IrDeclarationOrigin.PROPERTY_BACKING_FIELD, descriptor,
startOffset, endOffset, backingOrigin, descriptor, type property.visibility, property.name, property.isVal, initializer, type
) { symbol -> )
IrFieldImpl( } else if (delegate != null) {
startOffset, endOffset, backingOrigin, symbol, backingField = createBackingField(
property.name, type, property.visibility, property, IrDeclarationOrigin.DELEGATE, descriptor,
isFinal = property.isVal, isExternal = false, Visibilities.PRIVATE, Name.identifier("${property.name}\$delegate"), true, delegate
isStatic = property.isStatic || irParent !is IrClass )
)
}.setParentByParentStack().withParent {
declarationStorage.enterScope(descriptor)
val initializerExpression = initializer?.toIrExpression()
this.initializer = initializerExpression?.let { IrExpressionBodyImpl(it) }
declarationStorage.leaveScope(descriptor)
}
} }
} }
getter = property.getter.accept(this@Fir2IrVisitor, type) as IrSimpleFunction getter = property.getter?.let { convertPropertyAccessor(it, type, delegate != null) }
if (property.isVar) { if (property.isVar) {
setter = property.setter!!.accept(this@Fir2IrVisitor, type) as IrSimpleFunction setter = property.setter?.let { convertPropertyAccessor(it, type, delegate != null) }
} }
property.annotations.forEach { property.annotations.forEach {
annotations += it.accept(this@Fir2IrVisitor, null) as IrConstructorCall annotations += it.accept(this@Fir2IrVisitor, null) as IrConstructorCall
@@ -511,10 +533,11 @@ internal class Fir2IrVisitor(
private fun createPropertyAccessor( private fun createPropertyAccessor(
propertyAccessor: FirPropertyAccessor, startOffset: Int, endOffset: Int, propertyAccessor: FirPropertyAccessor, startOffset: Int, endOffset: Int,
correspondingProperty: IrProperty, isDefault: Boolean, propertyType: IrType correspondingProperty: IrProperty, isDefault: Boolean, hasDelegate: Boolean, propertyType: IrType
): IrSimpleFunction { ): IrSimpleFunction {
val origin = when { val origin = when {
isDefault -> IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR isDefault -> IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR
hasDelegate -> IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR
else -> IrDeclarationOrigin.DEFINED else -> IrDeclarationOrigin.DEFINED
} }
val isSetter = propertyAccessor.isSetter val isSetter = propertyAccessor.isSetter
@@ -581,13 +604,13 @@ internal class Fir2IrVisitor(
} }
} }
override fun visitPropertyAccessor(propertyAccessor: FirPropertyAccessor, data: Any?): IrElement { private fun convertPropertyAccessor(propertyAccessor: FirPropertyAccessor, type: IrType, hasDelegate: Boolean): IrSimpleFunction {
val correspondingProperty = propertyStack.last() val correspondingProperty = propertyStack.last()
return propertyAccessor.convertWithOffsets { startOffset, endOffset -> return propertyAccessor.convertWithOffsets { startOffset, endOffset ->
createPropertyAccessor( createPropertyAccessor(
propertyAccessor, startOffset, endOffset, correspondingProperty, propertyAccessor, startOffset, endOffset, correspondingProperty,
isDefault = propertyAccessor is FirDefaultPropertyGetter || propertyAccessor is FirDefaultPropertySetter, isDefault = propertyAccessor is FirDefaultPropertyGetter || propertyAccessor is FirDefaultPropertySetter,
propertyType = data as IrType hasDelegate = hasDelegate, propertyType = type
) )
} }
} }
@@ -750,6 +773,34 @@ internal class Fir2IrVisitor(
return qualifiedAccessExpression.toIrExpression(qualifiedAccessExpression.typeRef).applyReceivers(qualifiedAccessExpression) return qualifiedAccessExpression.toIrExpression(qualifiedAccessExpression.typeRef).applyReceivers(qualifiedAccessExpression)
} }
override fun visitCallableReferenceAccess(callableReferenceAccess: FirCallableReferenceAccess, data: Any?): IrElement {
val symbol = callableReferenceAccess.calleeReference.toSymbol(declarationStorage)
val type = callableReferenceAccess.typeRef.toIrType(this@Fir2IrVisitor.session, declarationStorage)
return callableReferenceAccess.convertWithOffsets { startOffset, endOffset ->
when (symbol) {
is IrPropertySymbol -> {
IrPropertyReferenceImpl(
startOffset, endOffset, type, symbol, 0,
symbol.owner.backingField?.symbol,
symbol.owner.getter?.symbol,
symbol.owner.setter?.symbol
)
}
is IrFunctionSymbol -> {
IrFunctionReferenceImpl(
startOffset, endOffset, type, symbol,
symbol.descriptor, 0
)
}
else -> {
IrErrorCallExpressionImpl(
startOffset, endOffset, type, "Unsupported callable reference: ${callableReferenceAccess.render()}"
)
}
}
}
}
private fun generateErrorCallExpression(startOffset: Int, endOffset: Int, calleeReference: FirReference): IrErrorCallExpression { private fun generateErrorCallExpression(startOffset: Int, endOffset: Int, calleeReference: FirReference): IrErrorCallExpression {
return IrErrorCallExpressionImpl( return IrErrorCallExpressionImpl(
startOffset, endOffset, IrErrorTypeImpl(null, emptyList(), Variance.INVARIANT), startOffset, endOffset, IrErrorTypeImpl(null, emptyList(), Variance.INVARIANT),
@@ -11,8 +11,10 @@ import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.FirField import org.jetbrains.kotlin.fir.declarations.FirField
import org.jetbrains.kotlin.fir.declarations.impl.FirAbstractCallableMember import org.jetbrains.kotlin.fir.declarations.impl.FirAbstractCallableMember
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirFieldSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirFieldSymbol
import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.FirTransformer
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
class FirJavaField( class FirJavaField(
@@ -40,7 +42,14 @@ class FirJavaField(
override val initializer: FirExpression? override val initializer: FirExpression?
get() = null get() = null
override val delegateFieldSymbol: FirDelegateFieldSymbol<FirField>?
get() = null
init { init {
status.isStatic = isStatic status.isStatic = isStatic
} }
override fun <D> transformChildrenWithoutAccessors(transformer: FirTransformer<D>, data: D) {
transformChildren(transformer, data)
}
} }
@@ -8,20 +8,25 @@ package org.jetbrains.kotlin.fir.builder
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import com.intellij.psi.tree.IElementType import com.intellij.psi.tree.IElementType
import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes
import org.jetbrains.kotlin.descriptors.Visibilities
import org.jetbrains.kotlin.fir.FirFunctionTarget
import org.jetbrains.kotlin.fir.FirReference import org.jetbrains.kotlin.fir.FirReference
import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.FirWhenSubject import org.jetbrains.kotlin.fir.FirWhenSubject
import org.jetbrains.kotlin.fir.declarations.impl.FirModifiableAccessorsOwner
import org.jetbrains.kotlin.fir.declarations.impl.FirPropertyAccessorImpl
import org.jetbrains.kotlin.fir.declarations.impl.FirValueParameterImpl
import org.jetbrains.kotlin.fir.declarations.impl.FirVariableImpl import org.jetbrains.kotlin.fir.declarations.impl.FirVariableImpl
import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.*
import org.jetbrains.kotlin.fir.expressions.impl.* import org.jetbrains.kotlin.fir.expressions.impl.*
import org.jetbrains.kotlin.fir.references.FirErrorNamedReference import org.jetbrains.kotlin.fir.references.*
import org.jetbrains.kotlin.fir.references.FirExplicitThisReference
import org.jetbrains.kotlin.fir.references.FirResolvedCallableReferenceImpl
import org.jetbrains.kotlin.fir.references.FirSimpleNamedReference
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.types.ConeStarProjection
import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.types.impl.FirImplicitBooleanTypeRef import org.jetbrains.kotlin.fir.types.impl.FirImplicitBooleanTypeRef
import org.jetbrains.kotlin.fir.types.impl.FirImplicitKPropertyTypeRef
import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImpl import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImpl
import org.jetbrains.kotlin.fir.types.impl.FirImplicitUnitTypeRef
import org.jetbrains.kotlin.ir.expressions.IrConstKind import org.jetbrains.kotlin.ir.expressions.IrConstKind
import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
@@ -564,3 +569,66 @@ internal fun KtExpression?.generateAssignment(
lValue = initializeLValue(session, this@generateAssignment) { convert() as? FirQualifiedAccess } lValue = initializeLValue(session, this@generateAssignment) { convert() as? FirQualifiedAccess }
} }
} }
internal fun FirModifiableAccessorsOwner.generateAccessorsByDelegate(session: FirSession, member: Boolean) {
val variable = this as FirVariable<*>
val delegateFieldSymbol = delegateFieldSymbol ?: return
fun delegateAccess() = FirQualifiedAccessExpressionImpl(session, null).apply {
calleeReference = FirDelegateFieldReferenceImpl(session, null, delegateFieldSymbol)
}
fun thisRef() =
if (member) FirQualifiedAccessExpressionImpl(session, null).apply {
calleeReference = FirExplicitThisReference(session, null, null)
}
else FirConstExpressionImpl(session, null, IrConstKind.Null, null)
fun propertyRef() = FirCallableReferenceAccessImpl(session, null).apply {
calleeReference = FirResolvedCallableReferenceImpl(session, null, variable.name, variable.symbol)
typeRef = FirImplicitKPropertyTypeRef(session, null, ConeStarProjection)
}
getter = (getter as? FirPropertyAccessorImpl)
?: FirPropertyAccessorImpl(session, null, true, Visibilities.UNKNOWN, FirImplicitTypeRefImpl(session, null)).apply Accessor@{
body = FirSingleExpressionBlock(
session,
FirReturnExpressionImpl(
session, null,
FirFunctionCallImpl(session, null).apply {
explicitReceiver = delegateAccess()
calleeReference = FirSimpleNamedReference(session, null, GET_VALUE)
arguments += thisRef()
arguments += propertyRef()
}
).apply {
target = FirFunctionTarget(null)
target.bind(this@Accessor)
}
)
}
setter = (setter as? FirPropertyAccessorImpl)
?: FirPropertyAccessorImpl(session, null, false, Visibilities.UNKNOWN, FirImplicitUnitTypeRef(session, null)).apply {
val parameter = FirValueParameterImpl(
session, null, DELEGATED_SETTER_PARAM,
FirImplicitTypeRefImpl(session, null),
defaultValue = null, isCrossinline = false,
isNoinline = false, isVararg = false
)
valueParameters += parameter
body = FirSingleExpressionBlock(
session, FirFunctionCallImpl(session, null).apply {
explicitReceiver = delegateAccess()
calleeReference = FirSimpleNamedReference(session, null, SET_VALUE)
arguments += thisRef()
arguments += propertyRef()
arguments += FirQualifiedAccessExpressionImpl(session, null).apply {
calleeReference = FirResolvedCallableReferenceImpl(session, psi, DELEGATED_SETTER_PARAM, parameter.symbol)
}
}
)
}
}
private val GET_VALUE = Name.identifier("getValue")
private val SET_VALUE = Name.identifier("setValue")
private val DELEGATED_SETTER_PARAM = Name.special("<set-?>")
@@ -70,7 +70,7 @@ class RawFirBuilder(val session: FirSession, val stubMode: Boolean) {
} }
private inner class Visitor : KtVisitor<FirElement, Unit>() { private inner class Visitor : KtVisitor<FirElement, Unit>() {
private inline fun <reified R : FirElement> KtElement?.convertSafe(): R? = private inline fun <reified R : FirElement> KtElement?. convertSafe(): R? =
this?.accept(this@Visitor, Unit) as? R this?.accept(this@Visitor, Unit) as? R
private inline fun <reified R : FirElement> KtElement.convert(): R = private inline fun <reified R : FirElement> KtElement.convert(): R =
@@ -285,10 +285,11 @@ class RawFirBuilder(val session: FirSession, val stubMode: Boolean) {
this@RawFirBuilder.session, this@toFirProperty, nameAsSafeName, firParameter.symbol this@RawFirBuilder.session, this@toFirProperty, nameAsSafeName, firParameter.symbol
) )
}, },
getter = FirDefaultPropertyGetter(session, this, type, visibility),
setter = if (isMutable) FirDefaultPropertySetter(session, this, type, visibility) else null,
delegate = null delegate = null
) ).apply {
getter = FirDefaultPropertyGetter(this@RawFirBuilder.session, this@toFirProperty, type, visibility)
setter = if (isMutable) FirDefaultPropertySetter(this@RawFirBuilder.session, this@toFirProperty, type, visibility) else null
}
extractAnnotationsTo(firProperty) extractAnnotationsTo(firProperty)
return firProperty return firProperty
} }
@@ -782,7 +783,9 @@ class RawFirBuilder(val session: FirSession, val stubMode: Boolean) {
isVar, isVar,
initializer, initializer,
delegate = property.delegate?.expression?.toFirExpression("Incorrect delegate expression") delegate = property.delegate?.expression?.toFirExpression("Incorrect delegate expression")
) ).apply {
generateAccessorsByDelegate(this@RawFirBuilder.session, member = false)
}
} else { } else {
FirMemberPropertyImpl( FirMemberPropertyImpl(
session, session,
@@ -800,13 +803,14 @@ class RawFirBuilder(val session: FirSession, val stubMode: Boolean) {
propertyType, propertyType,
isVar, isVar,
initializer, initializer,
property.getter.toFirPropertyAccessor(property, propertyType, isGetter = true),
if (isVar) property.setter.toFirPropertyAccessor(property, propertyType, isGetter = false) else null,
if (property.hasDelegate()) { if (property.hasDelegate()) {
{ property.delegate?.expression }.toFirExpression("Should have delegate") { property.delegate?.expression }.toFirExpression("Should have delegate")
} else null } else null
).apply { ).apply {
property.extractTypeParametersTo(this) property.extractTypeParametersTo(this)
getter = property.getter.toFirPropertyAccessor(property, propertyType, isGetter = true)
setter = if (isVar) property.setter.toFirPropertyAccessor(property, propertyType, isGetter = false) else null
generateAccessorsByDelegate(this@RawFirBuilder.session, member = !property.isTopLevel)
} }
} }
property.extractAnnotationsTo(firProperty) property.extractAnnotationsTo(firProperty)
@@ -173,14 +173,14 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) {
returnTypeRef = returnTypeRef, returnTypeRef = returnTypeRef,
isVar = isVar, isVar = isVar,
initializer = null, initializer = null,
getter = FirDefaultPropertyGetter(c.session, null, returnTypeRef, ProtoEnumFlags.visibility(Flags.VISIBILITY.get(getterFlags))),
setter = if (isVar) {
FirDefaultPropertySetter(c.session, null, returnTypeRef, ProtoEnumFlags.visibility(Flags.VISIBILITY.get(setterFlags)))
} else null,
delegate = null delegate = null
).apply { ).apply {
typeParameters += local.typeDeserializer.ownTypeParameters.map { it.fir } typeParameters += local.typeDeserializer.ownTypeParameters.map { it.fir }
annotations += c.annotationDeserializer.loadPropertyAnnotations(proto, local.nameResolver) annotations += c.annotationDeserializer.loadPropertyAnnotations(proto, local.nameResolver)
getter = FirDefaultPropertyGetter(c.session, null, returnTypeRef, ProtoEnumFlags.visibility(Flags.VISIBILITY.get(getterFlags)))
setter = if (isVar) {
FirDefaultPropertySetter(c.session, null, returnTypeRef, ProtoEnumFlags.visibility(Flags.VISIBILITY.get(setterFlags)))
} else null
} }
} }
@@ -61,10 +61,11 @@ class FirSyntheticPropertiesScope(
returnTypeRef = returnTypeRef, returnTypeRef = returnTypeRef,
isVar = true, isVar = true,
initializer = null, initializer = null,
getter = FirDefaultPropertyGetter(session, null, returnTypeRef, fir.visibility),
setter = FirDefaultPropertySetter(session, null, returnTypeRef, fir.visibility),
delegate = null delegate = null
) ).apply {
getter = FirDefaultPropertyGetter(this@FirSyntheticPropertiesScope.session, null, returnTypeRef, fir.visibility)
setter = FirDefaultPropertySetter(this@FirSyntheticPropertiesScope.session, null, returnTypeRef, fir.visibility)
}
return processor(synthetic) return processor(synthetic)
} }
@@ -414,6 +414,11 @@ open class FirBodyResolveTransformer(
} }
return qualifiedAccessExpression.compose() return qualifiedAccessExpression.compose()
} }
is FirDelegateFieldReference -> {
val delegateFieldSymbol = callee.coneSymbol
qualifiedAccessExpression.resultType = delegateFieldSymbol.delegate.typeRef
return qualifiedAccessExpression.compose()
}
is FirResolvedCallableReference -> { is FirResolvedCallableReference -> {
if (qualifiedAccessExpression.typeRef !is FirResolvedTypeRef) { if (qualifiedAccessExpression.typeRef !is FirResolvedTypeRef) {
storeTypeFromCallee(qualifiedAccessExpression) storeTypeFromCallee(qualifiedAccessExpression)
@@ -1020,21 +1025,10 @@ open class FirBodyResolveTransformer(
} }
) )
} }
variable.delegate != null -> { variable.getter != null && variable.getter !is FirDefaultPropertyAccessor -> {
// TODO: type from delegate
variable.transformReturnTypeRef( variable.transformReturnTypeRef(
this, this,
FirErrorTypeRefImpl( when (val resultType = variable.getter?.returnTypeRef) {
session,
null,
"Not supported: type from delegate"
)
)
}
variable is FirProperty && variable.getter !is FirDefaultPropertyAccessor -> {
variable.transformReturnTypeRef(
this,
when (val resultType = variable.getter.returnTypeRef) {
is FirImplicitTypeRef -> FirErrorTypeRefImpl( is FirImplicitTypeRef -> FirErrorTypeRefImpl(
session, session,
null, null,
@@ -1050,15 +1044,31 @@ open class FirBodyResolveTransformer(
) )
} }
} }
if (variable is FirProperty && variable.getter.returnTypeRef is FirImplicitTypeRef) { if (variable.getter?.returnTypeRef is FirImplicitTypeRef) {
variable.getter.transformReturnTypeRef(this, variable.returnTypeRef) variable.getter?.transformReturnTypeRef(this, variable.returnTypeRef)
} }
} }
} }
private fun <F : FirVariable<F>> FirVariable<F>.transformAccessors() {
var enhancedTypeRef = returnTypeRef
getter?.transform<FirDeclaration, Any?>(this@FirBodyResolveTransformer, enhancedTypeRef)
if (returnTypeRef is FirImplicitTypeRef) {
storeVariableReturnType(this)
enhancedTypeRef = returnTypeRef
}
setter?.let {
it.transform<FirDeclaration, Any?>(this@FirBodyResolveTransformer, enhancedTypeRef)
it.valueParameters[0].transformReturnTypeRef(StoreType, enhancedTypeRef)
}
}
override fun <F : FirVariable<F>> transformVariable(variable: FirVariable<F>, data: Any?): CompositeTransformResult<FirDeclaration> { override fun <F : FirVariable<F>> transformVariable(variable: FirVariable<F>, data: Any?): CompositeTransformResult<FirDeclaration> {
val variable = super.transformVariable(variable, variable.returnTypeRef).single as FirVariable<*> variable.transformChildrenWithoutAccessors(this, variable.returnTypeRef)
storeVariableReturnType(variable) if (variable.initializer != null) {
storeVariableReturnType(variable)
}
variable.transformAccessors()
if (variable !is FirProperty) { if (variable !is FirProperty) {
localScopes.lastOrNull()?.storeDeclaration(variable) localScopes.lastOrNull()?.storeDeclaration(variable)
} }
@@ -1075,23 +1085,14 @@ open class FirBodyResolveTransformer(
localScopes.addIfNotNull(primaryConstructorParametersScope) localScopes.addIfNotNull(primaryConstructorParametersScope)
withContainer(property) { withContainer(property) {
property.transformChildrenWithoutAccessors(this, returnTypeRef) property.transformChildrenWithoutAccessors(this, returnTypeRef)
if (property.returnTypeRef is FirImplicitTypeRef && property.initializer != null) { if (property.initializer != null) {
storeVariableReturnType(property) storeVariableReturnType(property)
} }
withScopeCleanup(localScopes) { withScopeCleanup(localScopes) {
localScopes.add(FirLocalScope().apply { localScopes.add(FirLocalScope().apply {
storeBackingField(property) storeBackingField(property)
}) })
var enhancedTypeRef = property.returnTypeRef property.transformAccessors()
property.getter.transform<FirDeclaration, Any?>(this, enhancedTypeRef)
if (property.returnTypeRef is FirImplicitTypeRef) {
storeVariableReturnType(property)
enhancedTypeRef = property.returnTypeRef
}
property.setter?.let {
it.transform<FirDeclaration, Any?>(this, enhancedTypeRef)
it.valueParameters[0].transformReturnTypeRef(StoreType, enhancedTypeRef)
}
} }
} }
property.compose() property.compose()
@@ -43,7 +43,7 @@ class FirStatusResolveTransformer : FirAbstractTreeTransformer() {
Modality.FINAL Modality.FINAL
this is FirNamedFunction && body == null -> this is FirNamedFunction && body == null ->
Modality.ABSTRACT Modality.ABSTRACT
this is FirProperty && initializer == null && getter.body == null && setter?.body == null -> this is FirProperty && initializer == null && getter?.body == null && setter?.body == null ->
Modality.ABSTRACT Modality.ABSTRACT
else -> else ->
Modality.OPEN Modality.OPEN
@@ -0,0 +1,5 @@
class C(val map: MutableMap<String, Any>) {
var foo by map
}
var bar by hashMapOf<String, Any>()
@@ -0,0 +1,25 @@
FILE: simpleDelegatedToMap.kt
public final class C : R|kotlin/Any| {
public constructor(map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>|): R|C| {
super<R|kotlin/Any|>()
}
public final val map: R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>| = R|<local>/map|
public get(): R|kotlin/collections/MutableMap<kotlin/String, kotlin/Any>|
public final var foo: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>by R|<local>/map|
public get(): <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]> {
^ D|/C.foo|.<Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#(this#, ::R|/C.foo|)
}
public set(<set-?>: <ERROR TYPE REF: Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>): R|kotlin/Unit| {
D|/C.foo|.<Inapplicable(INAPPLICABLE): [kotlin/collections/setValue]>#(this#, ::R|/C.foo|, R|<local>/<set-?>|)
}
}
public final var bar: <ERROR TYPE REF: Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>by R|kotlin/collections/hashMapOf|<R|kotlin/String|, R|kotlin/Any|>()
public get(): <ERROR TYPE REF: Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]> {
^ D|/bar|.<Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>#(Null(null), ::R|/bar|)
}
public set(<set-?>: <ERROR TYPE REF: Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>): R|kotlin/Unit| {
D|/bar|.<Inapplicable(WRONG_RECEIVER): [kotlin/collections/setValue]>#(Null(null), ::R|/bar|, R|<local>/<set-?>|)
}
@@ -0,0 +1,9 @@
//val x = lazy { "Hello" }.getValue(null, throw null)
val x by lazy { "Hello" }
fun foo() {
x.length
val y by lazy { "Bye" }
y.length
}
@@ -0,0 +1,16 @@
FILE: simpleLazy.kt
public final val x: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
String(Hello)
}
)
public get(): R|kotlin/String| {
^ D|/x|.R|kotlin/getValue|<R|kotlin/String|>(Null(null), ::R|/x|)
}
public final fun foo(): R|kotlin/Unit| {
R|/x|.R|kotlin/String.length|
lval y: R|kotlin/String|by R|kotlin/lazy|<R|kotlin/String|>(<L> = lazy@fun <anonymous>(): R|kotlin/String| {
String(Bye)
}
)
R|<local>/y|.R|kotlin/String.length|
}
@@ -94,6 +94,16 @@ public class FirResolveTestCaseWithStdlibGenerated extends AbstractFirResolveTes
runTest("compiler/fir/resolve/testData/resolve/stdlib/reflectionClass.kt"); runTest("compiler/fir/resolve/testData/resolve/stdlib/reflectionClass.kt");
} }
@TestMetadata("simpleDelegatedToMap.kt")
public void testSimpleDelegatedToMap() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/simpleDelegatedToMap.kt");
}
@TestMetadata("simpleLazy.kt")
public void testSimpleLazy() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/simpleLazy.kt");
}
@TestMetadata("topLevelResolve.kt") @TestMetadata("topLevelResolve.kt")
public void testTopLevelResolve() throws Exception { public void testTopLevelResolve() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.kt"); runTest("compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.kt");
@@ -0,0 +1,25 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.visitors.FirVisitor
import org.jetbrains.kotlin.name.Name
interface FirDelegateFieldReference : FirResolvedCallableReference {
override val name: Name
get() = NAME
override val coneSymbol: FirDelegateFieldSymbol<*>
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
visitor.visitDelegateFieldReference(this, data)
companion object {
val NAME = Name.identifier("\$delegate")
}
}
@@ -346,8 +346,8 @@ class FirRenderer(builder: StringBuilder) : FirVisitorVoid() {
visitVariable(property) visitVariable(property)
println() println()
pushIndent() pushIndent()
property.getter.accept(this) property.getter?.accept(this)
if (property.getter.body == null) { if (property.getter?.body == null) {
println() println()
} }
if (property.isVar) { if (property.isVar) {
@@ -804,6 +804,12 @@ class FirRenderer(builder: StringBuilder) : FirVisitorVoid() {
print("|") print("|")
} }
override fun visitDelegateFieldReference(delegateFieldReference: FirDelegateFieldReference) {
print("D|")
print(delegateFieldReference.coneSymbol.callableId)
print("|")
}
override fun visitResolvedCallableReference(resolvedCallableReference: FirResolvedCallableReference) { override fun visitResolvedCallableReference(resolvedCallableReference: FirResolvedCallableReference) {
print("R|") print("R|")
val isFakeOverride = (resolvedCallableReference.coneSymbol as? FirNamedFunctionSymbol)?.isFakeOverride == true val isFakeOverride = (resolvedCallableReference.coneSymbol as? FirNamedFunctionSymbol)?.isFakeOverride == true
@@ -23,14 +23,13 @@ interface FirProperty :
override val isOverride: Boolean get() = status.isOverride override val isOverride: Boolean get() = status.isOverride
// Should it be nullable or have some default? // Should it be nullable or have some default?
val getter: FirPropertyAccessor override val getter: FirPropertyAccessor?
val setter: FirPropertyAccessor? override val setter: FirPropertyAccessor?
// TODO: it should be probably nullable
val backingFieldSymbol: FirBackingFieldSymbol val backingFieldSymbol: FirBackingFieldSymbol
fun <D> transformChildrenWithoutAccessors(transformer: FirTransformer<D>, data: D)
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
visitor.visitProperty(this, data) visitor.visitProperty(this, data)
@@ -38,7 +37,7 @@ interface FirProperty :
super<FirCallableMemberDeclaration>.acceptChildren(visitor, data) super<FirCallableMemberDeclaration>.acceptChildren(visitor, data)
initializer?.accept(visitor, data) initializer?.accept(visitor, data)
delegate?.accept(visitor, data) delegate?.accept(visitor, data)
getter.accept(visitor, data) getter?.accept(visitor, data)
setter?.accept(visitor, data) setter?.accept(visitor, data)
} }
} }
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.VisitedSupertype
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.expressions.FirVariable import org.jetbrains.kotlin.fir.expressions.FirVariable
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.visitors.FirTransformer
import org.jetbrains.kotlin.fir.visitors.FirVisitor import org.jetbrains.kotlin.fir.visitors.FirVisitor
@BaseTransformedType @BaseTransformedType
@@ -24,6 +25,10 @@ interface FirValueParameter : @VisitedSupertype FirDeclaration, FirTypedDeclarat
override val symbol: FirVariableSymbol<FirValueParameter> override val symbol: FirVariableSymbol<FirValueParameter>
override fun <D> transformChildrenWithoutAccessors(transformer: FirTransformer<D>, data: D) {
transformChildren(transformer, data)
}
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
visitor.visitValueParameter(this, data) visitor.visitValueParameter(this, data)
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.FirValueParameter import org.jetbrains.kotlin.fir.declarations.FirValueParameter
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.transformSingle import org.jetbrains.kotlin.fir.transformSingle
import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.FirTypeRef
@@ -33,6 +34,8 @@ class FirDefaultSetterValueParameter(
get() = null get() = null
override val receiverTypeRef: FirTypeRef? override val receiverTypeRef: FirTypeRef?
get() = null get() = null
override val delegateFieldSymbol: FirDelegateFieldSymbol<FirValueParameter>?
get() = null
override val isCrossinline = false override val isCrossinline = false
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.fir.declarations.FirProperty
import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.symbols.impl.FirBackingFieldSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirBackingFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
import org.jetbrains.kotlin.fir.transformInplace import org.jetbrains.kotlin.fir.transformInplace
import org.jetbrains.kotlin.fir.transformSingle import org.jetbrains.kotlin.fir.transformSingle
@@ -37,17 +38,24 @@ class FirMemberPropertyImpl(
returnTypeRef: FirTypeRef, returnTypeRef: FirTypeRef,
override val isVar: Boolean, override val isVar: Boolean,
override var initializer: FirExpression?, override var initializer: FirExpression?,
override var getter: FirPropertyAccessor,
override var setter: FirPropertyAccessor?,
override var delegate: FirExpression? override var delegate: FirExpression?
) : FirAbstractCallableMember<FirProperty>( ) : FirAbstractCallableMember<FirProperty>(
session, psi, name, visibility, modality, isExpect, isActual, isOverride, receiverTypeRef, returnTypeRef session, psi, name, visibility, modality, isExpect, isActual, isOverride, receiverTypeRef, returnTypeRef
), FirProperty { ), FirProperty, FirModifiableAccessorsOwner {
// TODO: backing field may not exist
override val backingFieldSymbol = FirBackingFieldSymbol(symbol.callableId) override val backingFieldSymbol = FirBackingFieldSymbol(symbol.callableId)
override val delegateFieldSymbol: FirDelegateFieldSymbol<FirProperty>? =
delegate?.let { FirDelegateFieldSymbol(symbol.callableId) }
override var getter: FirPropertyAccessor? = null
override var setter: FirPropertyAccessor? = null
init { init {
symbol.bind(this) symbol.bind(this)
backingFieldSymbol.bind(this) backingFieldSymbol.bind(this)
delegateFieldSymbol?.bind(this)
status.isConst = isConst status.isConst = isConst
status.isLateInit = isLateInit status.isLateInit = isLateInit
} }
@@ -63,7 +71,7 @@ class FirMemberPropertyImpl(
} }
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement { override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
getter = getter.transformSingle(transformer, data) getter = getter?.transformSingle(transformer, data)
setter = setter?.transformSingle(transformer, data) setter = setter?.transformSingle(transformer, data)
transformChildrenWithoutAccessors(transformer, data) transformChildrenWithoutAccessors(transformer, data)
// Everything other (annotations, etc.) is done above // Everything other (annotations, etc.) is done above
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.declarations.impl
import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
interface FirModifiableAccessorsOwner {
var getter: FirPropertyAccessor?
var setter: FirPropertyAccessor?
val delegateFieldSymbol: FirDelegateFieldSymbol<*>?
}
@@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.FirValueParameter import org.jetbrains.kotlin.fir.declarations.FirValueParameter
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.transformSingle import org.jetbrains.kotlin.fir.transformSingle
import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.FirTypeRef
@@ -40,6 +41,8 @@ open class FirValueParameterImpl(
get() = null get() = null
override val receiverTypeRef: FirTypeRef? override val receiverTypeRef: FirTypeRef?
get() = null get() = null
override val delegateFieldSymbol: FirDelegateFieldSymbol<FirValueParameter>?
get() = null
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement { override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
returnTypeRef = returnTypeRef.transformSingle(transformer, data) returnTypeRef = returnTypeRef.transformSingle(transformer, data)
@@ -8,9 +8,13 @@ package org.jetbrains.kotlin.fir.declarations.impl
import com.intellij.psi.PsiElement import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.FirProperty
import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.expressions.FirVariable import org.jetbrains.kotlin.fir.expressions.FirVariable
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.transformInplace
import org.jetbrains.kotlin.fir.transformSingle import org.jetbrains.kotlin.fir.transformSingle
import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.visitors.FirTransformer import org.jetbrains.kotlin.fir.visitors.FirTransformer
@@ -25,21 +29,36 @@ class FirVariableImpl(
override var initializer: FirExpression?, override var initializer: FirExpression?,
override val symbol: FirVariableSymbol<FirVariableImpl> = FirVariableSymbol(name), override val symbol: FirVariableSymbol<FirVariableImpl> = FirVariableSymbol(name),
override var delegate: FirExpression? = null override var delegate: FirExpression? = null
) : FirAbstractNamedAnnotatedDeclaration(session, psiElement, name), FirVariable<FirVariableImpl> { ) : FirAbstractNamedAnnotatedDeclaration(session, psiElement, name), FirVariable<FirVariableImpl>, FirModifiableAccessorsOwner {
override val delegateFieldSymbol: FirDelegateFieldSymbol<FirVariableImpl>? =
delegate?.let { FirDelegateFieldSymbol(symbol.callableId) }
override var getter: FirPropertyAccessor? = null
override var setter: FirPropertyAccessor? = null
init { init {
symbol.bind(this) symbol.bind(this)
delegateFieldSymbol?.bind(this)
} }
override val receiverTypeRef: FirTypeRef? override val receiverTypeRef: FirTypeRef?
get() = null get() = null
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement { override fun <D> transformChildrenWithoutAccessors(transformer: FirTransformer<D>, data: D) {
returnTypeRef = returnTypeRef.transformSingle(transformer, data) returnTypeRef = returnTypeRef.transformSingle(transformer, data)
initializer = initializer?.transformSingle(transformer, data) initializer = initializer?.transformSingle(transformer, data)
delegate = delegate?.transformSingle(transformer, data) delegate = delegate?.transformSingle(transformer, data)
annotations.transformInplace(transformer, data)
}
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data) override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
getter = getter?.transformSingle(transformer, data)
setter = setter?.transformSingle(transformer, data)
transformChildrenWithoutAccessors(transformer, data)
// Everything other (annotations, etc.) is done above
return this
} }
override fun <D> transformReturnTypeRef(transformer: FirTransformer<D>, data: D) { override fun <D> transformReturnTypeRef(transformer: FirTransformer<D>, data: D) {
@@ -7,7 +7,9 @@ package org.jetbrains.kotlin.fir.expressions
import org.jetbrains.kotlin.fir.VisitedSupertype import org.jetbrains.kotlin.fir.VisitedSupertype
import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
import org.jetbrains.kotlin.fir.visitors.FirTransformer
import org.jetbrains.kotlin.fir.visitors.FirVisitor import org.jetbrains.kotlin.fir.visitors.FirVisitor
interface FirVariable<F : FirVariable<F>> : interface FirVariable<F : FirVariable<F>> :
@@ -23,12 +25,22 @@ interface FirVariable<F : FirVariable<F>> :
override val symbol: FirVariableSymbol<F> override val symbol: FirVariableSymbol<F>
val getter: FirPropertyAccessor? get() = null
val setter: FirPropertyAccessor? get() = null
val delegateFieldSymbol: FirDelegateFieldSymbol<F>?
fun <D> transformChildrenWithoutAccessors(transformer: FirTransformer<D>, data: D)
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
visitor.visitVariable(this, data) visitor.visitVariable(this, data)
override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) { override fun <R, D> acceptChildren(visitor: FirVisitor<R, D>, data: D) {
initializer?.accept(visitor, data) initializer?.accept(visitor, data)
delegate?.accept(visitor, data) delegate?.accept(visitor, data)
getter?.accept(visitor, data)
setter?.accept(visitor, data)
super<FirCallableDeclaration>.acceptChildren(visitor, data) super<FirCallableDeclaration>.acceptChildren(visitor, data)
} }
} }
@@ -0,0 +1,18 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.references
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.fir.FirAbstractElement
import org.jetbrains.kotlin.fir.FirDelegateFieldReference
import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.symbols.impl.FirDelegateFieldSymbol
class FirDelegateFieldReferenceImpl(
session: FirSession,
psi: PsiElement?,
override val coneSymbol: FirDelegateFieldSymbol<*>
) : FirAbstractElement(session, psi), FirDelegateFieldReference
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.fir.symbols.impl
import org.jetbrains.kotlin.fir.declarations.FirField import org.jetbrains.kotlin.fir.declarations.FirField
import org.jetbrains.kotlin.fir.declarations.FirProperty import org.jetbrains.kotlin.fir.declarations.FirProperty
import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.expressions.FirVariable import org.jetbrains.kotlin.fir.expressions.FirVariable
import org.jetbrains.kotlin.fir.symbols.CallableId import org.jetbrains.kotlin.fir.symbols.CallableId
import org.jetbrains.kotlin.fir.symbols.ConePropertySymbol import org.jetbrains.kotlin.fir.symbols.ConePropertySymbol
@@ -23,4 +24,9 @@ open class FirPropertySymbol(callableId: CallableId) : ConePropertySymbol, FirVa
class FirBackingFieldSymbol(callableId: CallableId) : FirVariableSymbol<FirProperty>(callableId) class FirBackingFieldSymbol(callableId: CallableId) : FirVariableSymbol<FirProperty>(callableId)
class FirDelegateFieldSymbol<D : FirVariable<D>>(callableId: CallableId) : FirVariableSymbol<D>(callableId) {
val delegate: FirExpression
get() = fir.delegate!!
}
class FirFieldSymbol(callableId: CallableId) : FirVariableSymbol<FirField>(callableId) class FirFieldSymbol(callableId: CallableId) : FirVariableSymbol<FirField>(callableId)
@@ -12,18 +12,20 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTagImpl import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTagImpl
import org.jetbrains.kotlin.fir.symbols.StandardClassIds import org.jetbrains.kotlin.fir.symbols.StandardClassIds
import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.ConeKotlinType
import org.jetbrains.kotlin.fir.types.ConeKotlinTypeProjection
import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef
import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.ClassId
sealed class FirImplicitBuiltinTypeRef( sealed class FirImplicitBuiltinTypeRef(
session: FirSession, session: FirSession,
psi: PsiElement?, psi: PsiElement?,
val id: ClassId val id: ClassId,
typeArguments: Array<out ConeKotlinTypeProjection> = emptyArray()
) : FirResolvedTypeRef, FirAbstractElement(session, psi) { ) : FirResolvedTypeRef, FirAbstractElement(session, psi) {
override val annotations: List<FirAnnotationCall> override val annotations: List<FirAnnotationCall>
get() = emptyList() get() = emptyList()
override val type: ConeKotlinType = ConeClassTypeImpl(ConeClassLikeLookupTagImpl(id), emptyArray(), false) override val type: ConeKotlinType = ConeClassTypeImpl(ConeClassLikeLookupTagImpl(id), typeArguments, false)
} }
class FirImplicitUnitTypeRef( class FirImplicitUnitTypeRef(
@@ -61,3 +63,8 @@ class FirImplicitStringTypeRef(
psi: PsiElement? psi: PsiElement?
) : FirImplicitBuiltinTypeRef(session, psi, StandardClassIds.String) ) : FirImplicitBuiltinTypeRef(session, psi, StandardClassIds.String)
class FirImplicitKPropertyTypeRef(
session: FirSession,
psi: PsiElement?,
typeArgument: ConeKotlinTypeProjection
) : FirImplicitBuiltinTypeRef(session, psi, StandardClassIds.KProperty, arrayOf(typeArgument))
@@ -168,6 +168,10 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
return transformResolvedCallableReference(backingFieldReference, data) return transformResolvedCallableReference(backingFieldReference, data)
} }
open fun transformDelegateFieldReference(delegateFieldReference: FirDelegateFieldReference, data: D): CompositeTransformResult<FirNamedReference> {
return transformResolvedCallableReference(delegateFieldReference, data)
}
open fun <E : FirReference> transformSuperReference(superReference: E, data: D): CompositeTransformResult<E> { open fun <E : FirReference> transformSuperReference(superReference: E, data: D): CompositeTransformResult<E> {
return transformReference(superReference, data) return transformReference(superReference, data)
} }
@@ -552,6 +556,10 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
return transformDefaultPropertyAccessor(defaultPropertyAccessor, data) return transformDefaultPropertyAccessor(defaultPropertyAccessor, data)
} }
final override fun visitDelegateFieldReference(delegateFieldReference: FirDelegateFieldReference, data: D): CompositeTransformResult<FirElement> {
return transformDelegateFieldReference(delegateFieldReference, data)
}
final override fun visitDelegatedConstructorCall(delegatedConstructorCall: FirDelegatedConstructorCall, data: D): CompositeTransformResult<FirElement> { final override fun visitDelegatedConstructorCall(delegatedConstructorCall: FirDelegatedConstructorCall, data: D): CompositeTransformResult<FirElement> {
return transformDelegatedConstructorCall(delegatedConstructorCall, data) return transformDelegatedConstructorCall(delegatedConstructorCall, data)
} }
@@ -168,6 +168,10 @@ abstract class FirVisitor<out R, in D> {
return visitResolvedCallableReference(backingFieldReference, data) return visitResolvedCallableReference(backingFieldReference, data)
} }
open fun visitDelegateFieldReference(delegateFieldReference: FirDelegateFieldReference, data: D): R {
return visitResolvedCallableReference(delegateFieldReference, data)
}
open fun visitSuperReference(superReference: FirSuperReference, data: D): R { open fun visitSuperReference(superReference: FirSuperReference, data: D): R {
return visitReference(superReference, data) return visitReference(superReference, data)
} }
@@ -168,6 +168,10 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
visitResolvedCallableReference(backingFieldReference, null) visitResolvedCallableReference(backingFieldReference, null)
} }
open fun visitDelegateFieldReference(delegateFieldReference: FirDelegateFieldReference) {
visitResolvedCallableReference(delegateFieldReference, null)
}
open fun visitSuperReference(superReference: FirSuperReference) { open fun visitSuperReference(superReference: FirSuperReference) {
visitReference(superReference, null) visitReference(superReference, null)
} }
@@ -552,6 +556,10 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
visitDefaultPropertyAccessor(defaultPropertyAccessor) visitDefaultPropertyAccessor(defaultPropertyAccessor)
} }
final override fun visitDelegateFieldReference(delegateFieldReference: FirDelegateFieldReference, data: Nothing?) {
visitDelegateFieldReference(delegateFieldReference)
}
final override fun visitDelegatedConstructorCall(delegatedConstructorCall: FirDelegatedConstructorCall, data: Nothing?) { final override fun visitDelegatedConstructorCall(delegatedConstructorCall: FirDelegatedConstructorCall, data: Nothing?) {
visitDelegatedConstructorCall(delegatedConstructorCall) visitDelegatedConstructorCall(delegatedConstructorCall)
} }
@@ -18,10 +18,18 @@ FILE fqName:<root> fileName:/delegateFieldWithAnnotations.kt
PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
annotations: annotations:
Ann Ann
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun lazy (initializer: kotlin.Function0<T of <uninitialized parent>>): kotlin.Lazy<T of <uninitialized parent>> declared in kotlin' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
CONST Int type=kotlin.Int value=42
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of <uninitialized parent> [inline] declared in kotlin' type=kotlin.Int origin=null
$receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
@@ -84,27 +84,41 @@ FILE fqName:<root> fileName:/delegatedPropertyAccessorsWithAnnotations.kt
PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
annotations: annotations:
A(x = 'test1.get') A(x = 'test1.get')
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.Int) [primary] declared in <root>.Cell' type=<root>.Cell origin=null
value: CONST Int type=kotlin.Int value=1
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int declared in <root>.Cell' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static] ' type=<root>.Cell origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:<root>.Cell visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
annotations: annotations:
A(x = 'test2.get') A(x = 'test2.get')
A(x = 'test2.set') A(x = 'test2.set')
A(x = 'test2.set.param') A(x = 'test2.set.param')
FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [static] FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.Int) [primary] declared in <root>.Cell' type=<root>.Cell origin=null
value: CONST Int type=kotlin.Int value=2
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [static] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any?): kotlin.Int declared in <root>.Cell' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test2> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit $this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static] ' type=<root>.Cell origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test2> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,var]
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [static] ' type=kotlin.Unit origin=null CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any?, newValue: kotlin.Int): kotlin.Unit declared in <root>.Cell' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: IrErrorType declared in <root>.<set-test2>' type=IrErrorType origin=null $this: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static] ' type=<root>.Cell origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:test2$delegate type:<root>.Cell visibility:private [final,static] ' getter='public final fun <get-test2> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
newValue: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-test2>' type=kotlin.Int origin=null
@@ -30,5 +30,4 @@ FILE fqName:<root> fileName:/localDelegatedPropertiesWithAnnotations.kt
FUN name:foo visibility:public modality:FINAL <> (m:kotlin.collections.Map<kotlin.String, kotlin.Int>) returnType:kotlin.Unit FUN name:foo visibility:public modality:FINAL <> (m:kotlin.collections.Map<kotlin.String, kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:m index:0 type:kotlin.collections.Map<kotlin.String, kotlin.Int> VALUE_PARAMETER name:m index:0 type:kotlin.collections.Map<kotlin.String, kotlin.Int>
BLOCK_BODY BLOCK_BODY
VAR name:test type:IrErrorType [val] VAR name:test type:kotlin.Int [val]
@@ -83,31 +83,44 @@ FILE fqName:<root> fileName:/classLevelProperties.kt
correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] PROPERTY name:test7 visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:test7 type:IrErrorType visibility:public [final] FIELD DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test7> visibility:public modality:FINAL <> ($this:<root>.C) returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun lazy (initializer: kotlin.Function0<T of <uninitialized parent>>): kotlin.Lazy<T of <uninitialized parent>> declared in kotlin' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
CONST Int type=kotlin.Int value=42
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test7> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [delegated,val]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test7> (): IrErrorType declared in <root>.C' RETURN type=kotlin.Nothing from='public final fun <get-test7> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:IrErrorType visibility:public [final] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of <uninitialized parent> [inline] declared in kotlin' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-test7>' type=<root>.C origin=null $receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final] ' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
thisRef: ERROR_CALL 'Unresolved reference: this#' type=<root>.C
property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public FIELD DELEGATE name:test8$delegate type:java.util.HashMap<kotlin.String, kotlin.Int> visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test8> visibility:public modality:FINAL <> ($this:<root>.C) returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun hashMapOf (): java.util.HashMap<K of <uninitialized parent>, V of <uninitialized parent>> [inline] declared in kotlin.collections' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test8> visibility:public modality:FINAL <> ($this:<root>.C) returnType:IrErrorType
correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test8> (): IrErrorType declared in <root>.C' RETURN type=kotlin.Nothing from='public final fun <get-test8> (): IrErrorType declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>#' type=IrErrorType
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-test8>' type=<root>.C origin=null ERROR_CALL 'Unresolved reference: this#' type=<root>.C
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test8> visibility:public modality:FINAL <> ($this:<root>.C, <set-?>:IrErrorType) returnType:kotlin.Unit PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap<kotlin.String, kotlin.Int> visibility:private [final] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test8> visibility:public modality:FINAL <> ($this:<root>.C, <set-?>:IrErrorType) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType
BLOCK_BODY BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public ' type=kotlin.Unit origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(WRONG_RECEIVER): [kotlin/collections/setValue]>#' type=IrErrorType
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<set-test8>' type=<root>.C origin=null ERROR_CALL 'Unresolved reference: this#' type=<root>.C
value: GET_VAR '<set-?>: IrErrorType declared in <root>.C.<set-test8>' type=IrErrorType origin=null PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap<kotlin.String, kotlin.Int> visibility:private [final] ' getter='public final fun <get-test8> (): IrErrorType declared in <root>.C' setter=null type=kotlin.reflect.KProperty<*> origin=null
GET_VAR '<set-?>: IrErrorType declared in <root>.C.<set-test8>' type=IrErrorType origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden: overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -1,11 +1,20 @@
FILE fqName:<root> fileName:/delegatedProperties.kt FILE fqName:<root> fileName:/delegatedProperties.kt
PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun lazy (initializer: kotlin.Function0<T of <uninitialized parent>>): kotlin.Lazy<T of <uninitialized parent>> declared in kotlin' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
CONST Int type=kotlin.Int value=42
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of <uninitialized parent> [inline] declared in kotlin' type=kotlin.Int origin=null
$receiver: GET_FIELD 'FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final test1: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test1$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> (map:kotlin.collections.MutableMap<kotlin.String, kotlin.Any>) returnType:<root>.C [primary] CONSTRUCTOR visibility:public <> (map:kotlin.collections.MutableMap<kotlin.String, kotlin.Any>) returnType:<root>.C [primary]
@@ -25,31 +34,44 @@ FILE fqName:<root> fileName:/delegatedProperties.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.MutableMap<kotlin.String, kotlin.Any> visibility:public [final] ' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.MutableMap<kotlin.String, kotlin.Any> visibility:public [final] ' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-map>' type=<root>.C origin=null receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-map>' type=<root>.C origin=null
PROPERTY name:test2 visibility:public modality:FINAL [delegated,val] PROPERTY name:test2 visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final] FIELD DELEGATE name:test2$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> ($this:<root>.C) returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun lazy (initializer: kotlin.Function0<T of <uninitialized parent>>): kotlin.Lazy<T of <uninitialized parent>> declared in kotlin' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
CONST Int type=kotlin.Int value=42
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,val]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): IrErrorType declared in <root>.C' RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Int declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of <uninitialized parent> [inline] declared in kotlin' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-test2>' type=<root>.C origin=null $receiver: GET_FIELD 'FIELD DELEGATE name:test2$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final] ' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
thisRef: ERROR_CALL 'Unresolved reference: this#' type=<root>.C
property: PROPERTY_REFERENCE 'public final test2: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test2$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] PROPERTY name:test3 visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap<kotlin.String, kotlin.Any> visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> ($this:<root>.C) returnType:IrErrorType EXPRESSION_BODY
GET_VAR 'map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any> declared in <root>.C.<init>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> ($this:<root>.C) returnType:IrErrorType
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [delegated,var]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test3> (): IrErrorType declared in <root>.C' RETURN type=kotlin.Nothing from='public final fun <get-test3> (): IrErrorType declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Ambiguity: getValue, [kotlin/collections/getValue, kotlin/collections/getValue, kotlin/collections/getValue]>#' type=IrErrorType
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-test3>' type=<root>.C origin=null ERROR_CALL 'Unresolved reference: this#' type=<root>.C
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test3> visibility:public modality:FINAL <> ($this:<root>.C, <set-?>:IrErrorType) returnType:kotlin.Unit PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap<kotlin.String, kotlin.Any> visibility:private [final] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test3> visibility:public modality:FINAL <> ($this:<root>.C, <set-?>:IrErrorType) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [delegated,var]
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType
BLOCK_BODY BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public ' type=kotlin.Unit origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [kotlin/collections/setValue]>#' type=IrErrorType
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<set-test3>' type=<root>.C origin=null ERROR_CALL 'Unresolved reference: this#' type=<root>.C
value: GET_VAR '<set-?>: IrErrorType declared in <root>.C.<set-test3>' type=IrErrorType origin=null PROPERTY_REFERENCE 'public final test3: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test3$delegate type:kotlin.collections.MutableMap<kotlin.String, kotlin.Any> visibility:private [final] ' getter='public final fun <get-test3> (): IrErrorType declared in <root>.C' setter=null type=kotlin.reflect.KProperty<*> origin=null
GET_VAR '<set-?>: IrErrorType declared in <root>.C.<set-test3>' type=IrErrorType origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden: overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -64,16 +86,21 @@ FILE fqName:<root> fileName:/delegatedProperties.kt
public open fun toString (): kotlin.String declared in kotlin.Any public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any $this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] PROPERTY name:test4 visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_BACKING_FIELD name:test4 type:IrErrorType visibility:public [static] FIELD DELEGATE name:test4$delegate type:java.util.HashMap<kotlin.String, kotlin.Any> visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test4> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun hashMapOf (): java.util.HashMap<K of <uninitialized parent>, V of <uninitialized parent>> [inline] declared in kotlin.collections' type=java.util.HashMap<kotlin.String, kotlin.Any> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test4> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test4> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test4> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:IrErrorType visibility:public [static] ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test4> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit CONST Null type=kotlin.Nothing? value=null
PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test4$delegate type:java.util.HashMap<kotlin.String, kotlin.Any> visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test4> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [delegated,var]
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType
BLOCK_BODY BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:IrErrorType visibility:public [static] ' type=kotlin.Unit origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(WRONG_RECEIVER): [kotlin/collections/setValue]>#' type=IrErrorType
value: GET_VAR '<set-?>: IrErrorType declared in <root>.<set-test4>' type=IrErrorType origin=null CONST Null type=kotlin.Nothing? value=null
PROPERTY_REFERENCE 'public final test4: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test4$delegate type:java.util.HashMap<kotlin.String, kotlin.Any> visibility:private [final,static] ' getter='public final fun <get-test4> (): IrErrorType declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
GET_VAR '<set-?>: IrErrorType declared in <root>.<set-test4>' type=IrErrorType origin=null
@@ -1,9 +1,9 @@
FILE fqName:<root> fileName:/localDelegatedProperties.kt FILE fqName:<root> fileName:/localDelegatedProperties.kt
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR name:x type:IrErrorType [val] VAR name:x type:kotlin.Int [val]
ERROR_CALL 'Unresolved reference: <Ambiguity: println, [kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println, kotlin/io/println]>#' type=IrErrorType CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
GET_VAR 'val x: IrErrorType [val] declared in <root>.test1' type=IrErrorType origin=null message: GET_VAR 'val x: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR name:x type:IrErrorType [var] VAR name:x type:IrErrorType [var]
@@ -63,23 +63,37 @@ FILE fqName:<root> fileName:/packageLevelProperties.kt
FUN name:<get-test6> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN name:<get-test6> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val]
PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] PROPERTY name:test7 visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:test7 type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test7> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun lazy (initializer: kotlin.Function0<T of <uninitialized parent>>): kotlin.Lazy<T of <uninitialized parent>> declared in kotlin' type=kotlin.Lazy<kotlin.Int> origin=null
initializer: FUN_EXPR type=kotlin.Function0<kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Int
BLOCK_BODY
CONST Int type=kotlin.Int value=42
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test7> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test7> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test7> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): T of <uninitialized parent> [inline] declared in kotlin' type=kotlin.Int origin=null
$receiver: GET_FIELD 'FIELD DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' type=kotlin.Lazy<kotlin.Int> origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
property: PROPERTY_REFERENCE 'public final test7: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:test7$delegate type:kotlin.Lazy<kotlin.Int> visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public [static] FIELD DELEGATE name:test8$delegate type:java.util.HashMap<kotlin.String, kotlin.Int> visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test8> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CALL 'public final fun hashMapOf (): java.util.HashMap<K of <uninitialized parent>, V of <uninitialized parent>> [inline] declared in kotlin.collections' type=java.util.HashMap<kotlin.String, kotlin.Int> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-test8> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test8> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test8> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public [static] ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(PARAMETER_MAPPING_ERROR): [kotlin/collections/getValue]>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-test8> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit CONST Null type=kotlin.Nothing? value=null
PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap<kotlin.String, kotlin.Int> visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-test8> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var] correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [delegated,var]
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType
BLOCK_BODY BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:IrErrorType visibility:public [static] ' type=kotlin.Unit origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(WRONG_RECEIVER): [kotlin/collections/setValue]>#' type=IrErrorType
value: GET_VAR '<set-?>: IrErrorType declared in <root>.<set-test8>' type=IrErrorType origin=null CONST Null type=kotlin.Nothing? value=null
PROPERTY_REFERENCE 'public final test8: IrErrorType [delegated,var]' field='FIELD DELEGATE name:test8$delegate type:java.util.HashMap<kotlin.String, kotlin.Int> visibility:private [final,static] ' getter='public final fun <get-test8> (): IrErrorType declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
GET_VAR '<set-?>: IrErrorType declared in <root>.<set-test8>' type=IrErrorType origin=null
@@ -46,24 +46,34 @@ FILE fqName:<root> fileName:/differentReceivers.kt
RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String declared in <root>' RETURN type=kotlin.Nothing from='public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String declared in <root>'
ERROR_CALL 'Unresolved reference: this#' type=kotlin.String ERROR_CALL 'Unresolved reference: this#' type=kotlin.String
PROPERTY name:testO visibility:public modality:FINAL [delegated,val] PROPERTY name:testO visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:testO type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:testO$delegate type:<root>.MyClass visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testO> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.String) [primary] declared in <root>.MyClass' type=<root>.MyClass origin=null
value: CONST String type=kotlin.String value="O"
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-testO> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:testO visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:testO visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testO> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-testO> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testO type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Inapplicable(WRONG_RECEIVER): [/getValue]>#' type=IrErrorType
CONST Null type=kotlin.Nothing? value=null
PROPERTY_REFERENCE 'public final testO: IrErrorType [delegated,val]' field='FIELD DELEGATE name:testO$delegate type:<root>.MyClass visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:testK visibility:public modality:FINAL [delegated,val] PROPERTY name:testK visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:testK type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testK> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONST String type=kotlin.String value="K"
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-testK> visibility:public modality:FINAL <> () returnType:kotlin.String
correspondingProperty: PROPERTY name:testK visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:testK visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testK> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-testK> (): kotlin.String declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testK type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (receiver: kotlin.Any?, p: kotlin.Any): kotlin.String declared in <root>' type=kotlin.String origin=null
$receiver: GET_FIELD 'FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] ' type=kotlin.String origin=GET_PROPERTY
receiver: CONST Null type=kotlin.Nothing? value=null
p: PROPERTY_REFERENCE 'public final testK: kotlin.String [delegated,val]' field='FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:testOK visibility:public modality:FINAL [val] PROPERTY name:testOK visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:testOK type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:testOK type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Ambiguity: plus, [kotlin/plus, kotlin/plus, kotlin/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/sequences/plus, kotlin/sequences/plus, kotlin/sequences/plus, kotlin/text/plus]>#' type=IrErrorType ERROR_CALL 'Unresolved reference: <Ambiguity: plus, [kotlin/plus, kotlin/plus, kotlin/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/sequences/plus, kotlin/text/plus]>#' type=IrErrorType
CALL 'public final fun <get-testK> (): IrErrorType declared in <root>' type=IrErrorType origin=null CALL 'public final fun <get-testK> (): kotlin.String declared in <root>' type=kotlin.String origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testOK> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testOK> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:testOK visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:testOK visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -48,10 +48,10 @@ FILE fqName:<root> fileName:/localDifferentReceivers.kt
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY BLOCK_BODY
VAR name:testO type:IrErrorType [val] VAR name:testO type:IrErrorType [val]
VAR name:testK type:IrErrorType [val] VAR name:testK type:kotlin.String [val]
VAR name:testOK type:IrErrorType [val] VAR name:testOK type:IrErrorType [val]
ERROR_CALL 'Unresolved reference: <Ambiguity: plus, [kotlin/plus, kotlin/plus, kotlin/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/sequences/plus, kotlin/sequences/plus, kotlin/sequences/plus, kotlin/text/plus]>#' type=IrErrorType ERROR_CALL 'Unresolved reference: <Ambiguity: plus, [kotlin/plus, kotlin/plus, kotlin/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/collections/plus, kotlin/sequences/plus, kotlin/text/plus]>#' type=IrErrorType
GET_VAR 'val testK: IrErrorType [val] declared in <root>.box' type=IrErrorType origin=null GET_VAR 'val testK: kotlin.String [val] declared in <root>.box' type=kotlin.String origin=null
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>' RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
GET_VAR 'val testOK: IrErrorType [val] declared in <root>.box' type=IrErrorType origin=null GET_VAR 'val testOK: IrErrorType [val] declared in <root>.box' type=IrErrorType origin=null
@@ -83,14 +83,18 @@ FILE fqName:<root> fileName:/member.kt
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:testMember visibility:public modality:FINAL [delegated,val] PROPERTY name:testMember visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:testMember type:IrErrorType visibility:public [final] FIELD DELEGATE name:testMember$delegate type:<root>.DelegateProvider visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testMember> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.String) [primary] declared in <root>.DelegateProvider' type=<root>.DelegateProvider origin=null
value: CONST String type=kotlin.String value="OK"
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-testMember> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:IrErrorType
correspondingProperty: PROPERTY name:testMember visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:testMember visibility:public modality:FINAL [delegated,val]
$this: VALUE_PARAMETER name:<this> type:<root>.Host $this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testMember> (): IrErrorType declared in <root>.Host' RETURN type=kotlin.Nothing from='public final fun <get-testMember> (): IrErrorType declared in <root>.Host'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testMember type:IrErrorType visibility:public [final] ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Unresolved name: getValue>#' type=IrErrorType
receiver: GET_VAR '<this>: <root>.Host declared in <root>.Host.<get-testMember>' type=<root>.Host origin=null ERROR_CALL 'Unresolved reference: this#' type=<root>.Host
PROPERTY_REFERENCE 'public final testMember: IrErrorType [delegated,val]' field='FIELD DELEGATE name:testMember$delegate type:<root>.DelegateProvider visibility:private [final] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden: overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -55,14 +55,17 @@ FILE fqName:<root> fileName:/memberExtension.kt
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) [primary] declared in <root>.Host.StringDelegate' type=<root>.Host.StringDelegate origin=null CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) [primary] declared in <root>.Host.StringDelegate' type=<root>.Host.StringDelegate origin=null
s: ERROR_CALL 'Unresolved reference: this#' type=kotlin.String s: ERROR_CALL 'Unresolved reference: this#' type=kotlin.String
PROPERTY name:plusK visibility:public modality:FINAL [delegated,val] PROPERTY name:plusK visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:plusK type:IrErrorType visibility:public [final] FIELD DELEGATE name:plusK$delegate type:IrErrorType visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-plusK> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:IrErrorType EXPRESSION_BODY
CONST String type=IrErrorType value="K"
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-plusK> visibility:public modality:FINAL <> ($this:<root>.Host) returnType:IrErrorType
correspondingProperty: PROPERTY name:plusK visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:plusK visibility:public modality:FINAL [delegated,val]
$this: VALUE_PARAMETER name:<this> type:<root>.Host $this: VALUE_PARAMETER name:<this> type:<root>.Host
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-plusK> (): IrErrorType declared in <root>.Host' RETURN type=kotlin.Nothing from='public final fun <get-plusK> (): IrErrorType declared in <root>.Host'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:plusK type:IrErrorType visibility:public [final] ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Unresolved name: getValue>#' type=IrErrorType
receiver: GET_VAR '<this>: <root>.Host declared in <root>.Host.<get-plusK>' type=<root>.Host origin=null ERROR_CALL 'Unresolved reference: this#' type=<root>.Host
PROPERTY_REFERENCE 'public final plusK: IrErrorType [delegated,val]' field='FIELD DELEGATE name:plusK$delegate type:IrErrorType visibility:private [final] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:ok visibility:public modality:FINAL [val] PROPERTY name:ok visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:public [final] FIELD PROPERTY_BACKING_FIELD name:ok type:IrErrorType visibility:public [final]
EXPRESSION_BODY EXPRESSION_BODY
@@ -77,10 +77,14 @@ FILE fqName:<root> fileName:/topLevel.kt
public open fun toString (): kotlin.String declared in kotlin.Any public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any $this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val] PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:testTopLevel type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:testTopLevel$delegate type:<root>.DelegateProvider visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-testTopLevel> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (value: kotlin.String) [primary] declared in <root>.DelegateProvider' type=<root>.DelegateProvider origin=null
value: CONST String type=kotlin.String value="OK"
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-testTopLevel> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:testTopLevel visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-testTopLevel> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-testTopLevel> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testTopLevel type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: <Unresolved name: getValue>#' type=IrErrorType
CONST Null type=kotlin.Nothing? value=null
PROPERTY_REFERENCE 'public final testTopLevel: IrErrorType [delegated,val]' field='FIELD DELEGATE name:testTopLevel$delegate type:<root>.DelegateProvider visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
@@ -38,7 +38,7 @@ FILE fqName:<root> fileName:/boundCallableReferences.kt
PROPERTY name:test1 visibility:public modality:FINAL [val] PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: R|/A.A|()::<Unresolved name: foo>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -47,8 +47,7 @@ FILE fqName:<root> fileName:/boundCallableReferences.kt
PROPERTY name:test2 visibility:public modality:FINAL [val] PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-bar> (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final bar: kotlin.Int [val]' field='FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:public [final] ' getter='public final fun <get-bar> (): kotlin.Int declared in <root>.A' setter=null type=kotlin.Int origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -57,7 +56,7 @@ FILE fqName:<root> fileName:/boundCallableReferences.kt
PROPERTY name:test3 visibility:public modality:FINAL [val] PROPERTY name:test3 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: qux>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: R|/A.A|()::<Unresolved name: qux>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -36,7 +36,7 @@ FILE fqName:<root> fileName:/callableRefToGenericMember.kt
PROPERTY name:test1 visibility:public modality:FINAL [val] PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: R|/A.A|<R|kotlin/String|>()::<Unresolved name: foo>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -45,9 +45,7 @@ FILE fqName:<root> fileName:/callableRefToGenericMember.kt
PROPERTY name:test2 visibility:public modality:FINAL [val] PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-bar> (): kotlin.Int declared in <root>.A' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final bar: kotlin.Int [val]' field='FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.Int visibility:public [final] ' getter='public final fun <get-bar> (): kotlin.Int declared in <root>.A' setter=null type=kotlin.Int origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A<kotlin.String> origin=null
<class: T>: <none>
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -37,7 +37,7 @@ FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt
PROPERTY name:test1 visibility:public modality:FINAL [val] PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-a> (): kotlin.String declared in test.Foo' type=kotlin.String origin=null PROPERTY_REFERENCE 'public final a: kotlin.String [val]' field='FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:public [final] ' getter='public final fun <get-a> (): kotlin.String declared in test.Foo' setter=null type=kotlin.String origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.String
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -46,8 +46,7 @@ FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt
PROPERTY name:test1a visibility:public modality:FINAL [val] PROPERTY name:test1a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1a type:kotlin.String visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test1a type:kotlin.String visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-a> (): kotlin.String declared in test.Foo' type=kotlin.String origin=null PROPERTY_REFERENCE 'public final a: kotlin.String [val]' field='FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:public [final] ' getter='public final fun <get-a> (): kotlin.String declared in test.Foo' setter=null type=kotlin.String origin=null
$this: GET_OBJECT 'CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' type=test.Foo
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1a> visibility:public modality:FINAL <> () returnType:kotlin.String FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1a> visibility:public modality:FINAL <> () returnType:kotlin.String
correspondingProperty: PROPERTY name:test1a visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test1a visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -56,7 +55,7 @@ FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt
PROPERTY name:test2 visibility:public modality:FINAL [val] PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: foo>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -65,7 +64,7 @@ FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt
PROPERTY name:test2a visibility:public modality:FINAL [val] PROPERTY name:test2a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2a type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test2a type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: Q|test/Foo|::<Unresolved name: foo>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2a> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2a> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test2a visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test2a visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -34,7 +34,7 @@ FILE fqName:<root> fileName:/callableReferenceTypeArguments.kt
PROPERTY name:test1 visibility:public modality:FINAL [val] PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: topLevel1>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: topLevel1>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit> FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit>
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -43,7 +43,7 @@ FILE fqName:<root> fileName:/callableReferenceTypeArguments.kt
PROPERTY name:test2 visibility:public modality:FINAL [val] PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: topLevel2>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: topLevel2>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit> FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.collections.List<kotlin.String>, kotlin.Unit>
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -52,7 +52,7 @@ FILE fqName:<root> fileName:/callableReferenceTypeArguments.kt
PROPERTY name:test3 visibility:public modality:FINAL [val] PROPERTY name:test3 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.Function1<kotlin.Int, kotlin.Unit> visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: objectMember>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: objectMember>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit> FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, kotlin.Unit>
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -65,19 +65,31 @@ FILE fqName:<root> fileName:/genericPropertyRef.kt
public open fun toString (): kotlin.String declared in kotlin.Any public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any $this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val] PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:additionalText type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:additionalText$delegate type:<root>.DVal visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-additionalText> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (kmember: kotlin.Any) [primary] declared in <root>.DVal' type=<root>.DVal origin=null
kmember: PROPERTY_REFERENCE 'public final text: kotlin.String? [var]' field='FIELD PROPERTY_BACKING_FIELD name:text type:kotlin.String? visibility:public ' getter='public final fun <get-text> (): kotlin.String? declared in <root>.Value' setter='public final fun <set-text> (<set-?>: kotlin.String?): kotlin.Unit declared in <root>.Value' type=kotlin.String? origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-additionalText> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:additionalText visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-additionalText> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-additionalText> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:additionalText type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int declared in <root>.DVal' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:additionalText$delegate type:<root>.DVal visibility:private [final,static] ' type=<root>.DVal origin=GET_PROPERTY
t: CONST Null type=kotlin.Nothing? value=null
p: PROPERTY_REFERENCE 'public final additionalText: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:additionalText$delegate type:<root>.DVal visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val] PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:additionalValue type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:additionalValue$delegate type:<root>.DVal visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-additionalValue> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> (kmember: kotlin.Any) [primary] declared in <root>.DVal' type=<root>.DVal origin=null
kmember: PROPERTY_REFERENCE 'public final value: T of <root>.Value [var]' field='FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Value visibility:public ' getter='public final fun <get-value> (): T of <root>.Value declared in <root>.Value' setter='public final fun <set-value> (<set-?>: T of <root>.Value): kotlin.Unit declared in <root>.Value' type=T of <root>.Value origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-additionalValue> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:additionalValue visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-additionalValue> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-additionalValue> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:additionalValue type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (t: kotlin.Any?, p: kotlin.Any): kotlin.Int declared in <root>.DVal' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:additionalValue$delegate type:<root>.DVal visibility:private [final,static] ' type=<root>.DVal origin=GET_PROPERTY
t: CONST Null type=kotlin.Nothing? value=null
p: PROPERTY_REFERENCE 'public final additionalValue: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:additionalValue$delegate type:<root>.DVal visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
CLASS CLASS name:DVal modality:FINAL visibility:public superTypes:[kotlin.Any] CLASS CLASS name:DVal modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DVal $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DVal
CONSTRUCTOR visibility:public <> (kmember:kotlin.Any) returnType:<root>.DVal [primary] CONSTRUCTOR visibility:public <> (kmember:kotlin.Any) returnType:<root>.DVal [primary]
@@ -163,7 +175,7 @@ FILE fqName:<root> fileName:/genericPropertyRef.kt
PROPERTY name:barRef visibility:public modality:FINAL [val] PROPERTY name:barRef visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:barRef type:kotlin.String.Companion visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:barRef type:kotlin.String.Companion visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-bar> (): T of <uninitialized parent> declared in <root>' type=kotlin.String.Companion origin=null PROPERTY_REFERENCE 'public final bar: T of <uninitialized parent> [var]' field=null getter='public final fun <get-bar> (): T of <uninitialized parent> declared in <root>' setter='public final fun <set-bar> (value: T of <uninitialized parent>): kotlin.Unit declared in <root>' type=kotlin.String.Companion origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-barRef> visibility:public modality:FINAL <> () returnType:kotlin.String.Companion FUN DEFAULT_PROPERTY_ACCESSOR name:<get-barRef> visibility:public modality:FINAL <> () returnType:kotlin.String.Companion
correspondingProperty: PROPERTY name:barRef visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:barRef visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -92,7 +92,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_valWithBackingField visibility:public modality:FINAL [val] PROPERTY name:test_valWithBackingField visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_valWithBackingField type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_valWithBackingField type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-valWithBackingField> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final valWithBackingField: kotlin.Int [val]' field='FIELD PROPERTY_BACKING_FIELD name:valWithBackingField type:kotlin.Int visibility:public [final,static] ' getter='public final fun <get-valWithBackingField> (): kotlin.Int declared in <root>' setter=null type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_valWithBackingField> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_valWithBackingField> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_valWithBackingField visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_valWithBackingField visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -116,7 +116,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_varWithBackingField visibility:public modality:FINAL [val] PROPERTY name:test_varWithBackingField visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_varWithBackingField type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_varWithBackingField type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-varWithBackingField> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final varWithBackingField: kotlin.Int [var]' field='FIELD PROPERTY_BACKING_FIELD name:varWithBackingField type:kotlin.Int visibility:public [static] ' getter='public final fun <get-varWithBackingField> (): kotlin.Int declared in <root>' setter='public final fun <set-varWithBackingField> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithBackingField> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithBackingField> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_varWithBackingField visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_varWithBackingField visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -130,7 +130,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
correspondingProperty: PROPERTY name:varWithBackingFieldAndAccessors visibility:public modality:FINAL [var] correspondingProperty: PROPERTY name:varWithBackingFieldAndAccessors visibility:public modality:FINAL [var]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-varWithBackingFieldAndAccessors> (): kotlin.Int declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-varWithBackingFieldAndAccessors> (): kotlin.Int declared in <root>'
ERROR_CALL 'No getter found for F|/varWithBackingFieldAndAccessors|' type=kotlin.Int GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=GET_PROPERTY
FUN name:<set-varWithBackingFieldAndAccessors> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit FUN name:<set-varWithBackingFieldAndAccessors> visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:varWithBackingFieldAndAccessors visibility:public modality:FINAL [var] correspondingProperty: PROPERTY name:varWithBackingFieldAndAccessors visibility:public modality:FINAL [var]
VALUE_PARAMETER name:value index:0 type:kotlin.Int VALUE_PARAMETER name:value index:0 type:kotlin.Int
@@ -140,7 +140,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_varWithBackingFieldAndAccessors visibility:public modality:FINAL [val] PROPERTY name:test_varWithBackingFieldAndAccessors visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-varWithBackingFieldAndAccessors> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final varWithBackingFieldAndAccessors: kotlin.Int [var]' field='FIELD PROPERTY_BACKING_FIELD name:varWithBackingFieldAndAccessors type:kotlin.Int visibility:public [static] ' getter='public final fun <get-varWithBackingFieldAndAccessors> (): kotlin.Int declared in <root>' setter='public final fun <set-varWithBackingFieldAndAccessors> (value: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithBackingFieldAndAccessors> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithBackingFieldAndAccessors> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_varWithBackingFieldAndAccessors visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_varWithBackingFieldAndAccessors visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -155,7 +155,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_valWithAccessors visibility:public modality:FINAL [val] PROPERTY name:test_valWithAccessors visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_valWithAccessors type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_valWithAccessors type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-valWithAccessors> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final valWithAccessors: kotlin.Int [val]' field=null getter='public final fun <get-valWithAccessors> (): kotlin.Int declared in <root>' setter=null type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_valWithAccessors> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_valWithAccessors> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_valWithAccessors visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_valWithAccessors visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -174,50 +174,63 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_varWithAccessors visibility:public modality:FINAL [val] PROPERTY name:test_varWithAccessors visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_varWithAccessors type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_varWithAccessors type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-varWithAccessors> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final varWithAccessors: kotlin.Int [var]' field=null getter='public final fun <get-varWithAccessors> (): kotlin.Int declared in <root>' setter='public final fun <set-varWithAccessors> (value: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithAccessors> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithAccessors> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_varWithAccessors visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_varWithAccessors visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test_varWithAccessors> (): kotlin.Int declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test_varWithAccessors> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_varWithAccessors type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_varWithAccessors type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null
PROPERTY name:delegatedVal visibility:public modality:FINAL [delegated,val] PROPERTY name:delegatedVal visibility:public modality:FINAL [delegated,val]
FIELD PROPERTY_BACKING_FIELD name:delegatedVal type:IrErrorType visibility:public [final,static] FIELD DELEGATE name:delegatedVal$delegate type:<root>.Delegate visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-delegatedVal> visibility:public modality:FINAL <> () returnType:IrErrorType EXPRESSION_BODY
GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Delegate
FUN DELEGATED_PROPERTY_ACCESSOR name:<get-delegatedVal> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:delegatedVal visibility:public modality:FINAL [delegated,val] correspondingProperty: PROPERTY name:delegatedVal visibility:public modality:FINAL [delegated,val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-delegatedVal> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-delegatedVal> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegatedVal type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int declared in <root>.Delegate' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:delegatedVal$delegate type:<root>.Delegate visibility:private [final,static] ' type=<root>.Delegate origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:delegatedVal$delegate type:<root>.Delegate visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val] PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-delegatedVal> (): IrErrorType declared in <root>' type=IrErrorType origin=null PROPERTY_REFERENCE 'public final delegatedVal: kotlin.Int [delegated,val]' field='FIELD DELEGATE name:delegatedVal$delegate type:<root>.Delegate visibility:private [final,static] ' getter='public final fun <get-delegatedVal> (): kotlin.Int declared in <root>' setter=null type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_delegatedVal> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_delegatedVal> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_delegatedVal visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test_delegatedVal> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test_delegatedVal> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_delegatedVal type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null
PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var] PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var]
FIELD PROPERTY_BACKING_FIELD name:delegatedVar type:IrErrorType visibility:public [static] FIELD DELEGATE name:delegatedVar$delegate type:<root>.Delegate visibility:private [final,static]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-delegatedVar> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-delegatedVar> (): IrErrorType declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegatedVar type:IrErrorType visibility:public [static] ' type=IrErrorType origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-delegatedVar> visibility:public modality:FINAL <> (<set-?>:IrErrorType) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var]
VALUE_PARAMETER name:<set-?> index:0 type:IrErrorType
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegatedVar type:IrErrorType visibility:public [static] ' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: IrErrorType declared in <root>.<set-delegatedVar>' type=IrErrorType origin=null
PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_delegatedVar type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-delegatedVar> (): IrErrorType declared in <root>' type=IrErrorType origin=null GET_OBJECT 'CLASS OBJECT name:Delegate modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.Delegate
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_delegatedVar> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DELEGATED_PROPERTY_ACCESSOR name:<get-delegatedVar> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-delegatedVar> (): kotlin.Int declared in <root>'
CALL 'public final fun getValue (thisRef: kotlin.Any?, kProp: kotlin.Any): kotlin.Int declared in <root>.Delegate' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:delegatedVar$delegate type:<root>.Delegate visibility:private [final,static] ' type=<root>.Delegate origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:delegatedVar$delegate type:<root>.Delegate visibility:private [final,static] ' getter=null setter=null type=kotlin.reflect.KProperty<*> origin=null
FUN DELEGATED_PROPERTY_ACCESSOR name:<set-delegatedVar> visibility:public modality:FINAL <> (<set-?>:kotlin.Int) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:delegatedVar visibility:public modality:FINAL [delegated,var]
VALUE_PARAMETER name:<set-?> index:0 type:kotlin.Int
BLOCK_BODY
CALL 'public final fun setValue (thisRef: kotlin.Any?, kProp: kotlin.Any, value: kotlin.Int): kotlin.Unit declared in <root>.Delegate' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:delegatedVar$delegate type:<root>.Delegate visibility:private [final,static] ' type=<root>.Delegate origin=GET_PROPERTY
thisRef: CONST Null type=kotlin.Nothing? value=null
kProp: PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:delegatedVar$delegate type:<root>.Delegate visibility:private [final,static] ' getter='public final fun <get-delegatedVar> (): kotlin.Int declared in <root>' setter=null type=kotlin.reflect.KProperty<*> origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-delegatedVar>' type=kotlin.Int origin=null
PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_delegatedVar type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY
PROPERTY_REFERENCE 'public final delegatedVar: kotlin.Int [delegated,var]' field='FIELD DELEGATE name:delegatedVar$delegate type:<root>.Delegate visibility:private [final,static] ' getter='public final fun <get-delegatedVar> (): kotlin.Int declared in <root>' setter='public final fun <set-delegatedVar> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_delegatedVar> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_delegatedVar visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test_delegatedVar> (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun <get-test_delegatedVar> (): kotlin.Int declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_delegatedVar type:IrErrorType visibility:public [final,static] ' type=IrErrorType origin=null GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_delegatedVar type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=null
PROPERTY name:constVal visibility:public modality:FINAL [val] PROPERTY name:constVal visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:constVal type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:constVal type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
@@ -230,7 +243,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_constVal visibility:public modality:FINAL [val] PROPERTY name:test_constVal visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_constVal type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_constVal type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
CALL 'public final fun <get-constVal> (): kotlin.Int declared in <root>' type=kotlin.Int origin=null PROPERTY_REFERENCE 'public final constVal: kotlin.Int [val]' field='FIELD PROPERTY_BACKING_FIELD name:constVal type:kotlin.Int visibility:public [final,static] ' getter='public final fun <get-constVal> (): kotlin.Int declared in <root>' setter=null type=kotlin.Int origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_constVal> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_constVal> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_constVal visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_constVal visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -239,7 +252,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_J_CONST visibility:public modality:FINAL [val] PROPERTY name:test_J_CONST visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_J_CONST type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_J_CONST type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:CONST type:kotlin.Int visibility:public [final,static] ' type=kotlin.Int origin=GET_PROPERTY ERROR_CALL 'Unsupported callable reference: Q|J|::R|/J.CONST|' type=kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_J_CONST> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_J_CONST> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_J_CONST visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_J_CONST visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -248,7 +261,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_J_nonConst visibility:public modality:FINAL [val] PROPERTY name:test_J_nonConst visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_J_nonConst type:kotlin.Int visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_J_nonConst type:kotlin.Int visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:nonConst type:kotlin.Int visibility:public [static] ' type=kotlin.Int origin=GET_PROPERTY ERROR_CALL 'Unsupported callable reference: Q|J|::R|/J.nonConst|' type=kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_J_nonConst> visibility:public modality:FINAL <> () returnType:kotlin.Int FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_J_nonConst> visibility:public modality:FINAL <> () returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_J_nonConst visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_J_nonConst visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -257,7 +270,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_varWithPrivateSet visibility:public modality:FINAL [val] PROPERTY name:test_varWithPrivateSet visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_varWithPrivateSet type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_varWithPrivateSet type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: varWithPrivateSet>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: Q|C|::<Unresolved name: varWithPrivateSet>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithPrivateSet> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithPrivateSet> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test_varWithPrivateSet visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_varWithPrivateSet visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -266,7 +279,7 @@ FILE fqName:<root> fileName:/propertyReferences.kt
PROPERTY name:test_varWithProtectedSet visibility:public modality:FINAL [val] PROPERTY name:test_varWithProtectedSet visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_varWithProtectedSet type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test_varWithProtectedSet type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: varWithProtectedSet>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: Q|C|::<Unresolved name: varWithProtectedSet>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithProtectedSet> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_varWithProtectedSet> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test_varWithProtectedSet visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test_varWithProtectedSet visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -55,7 +55,7 @@ FILE fqName:<root> fileName:/reflectionLiterals.kt
PROPERTY name:test3 visibility:public modality:FINAL [val] PROPERTY name:test3 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test3 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: Q|A|::<Unresolved name: foo>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -73,7 +73,7 @@ FILE fqName:<root> fileName:/reflectionLiterals.kt
PROPERTY name:test5 visibility:public modality:FINAL [val] PROPERTY name:test5 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test5 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test5 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: R|/A.A|()::<Unresolved name: foo>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test5> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test5> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -82,7 +82,7 @@ FILE fqName:<root> fileName:/reflectionLiterals.kt
PROPERTY name:test6 visibility:public modality:FINAL [val] PROPERTY name:test6 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test6 type:IrErrorType visibility:public [final,static] FIELD PROPERTY_BACKING_FIELD name:test6 type:IrErrorType visibility:public [final,static]
EXPRESSION_BODY EXPRESSION_BODY
ERROR_CALL 'Unresolved reference: <Unresolved name: bar>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: bar>#' type=IrErrorType
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test6> visibility:public modality:FINAL <> () returnType:IrErrorType FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test6> visibility:public modality:FINAL <> () returnType:IrErrorType
correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val]
BLOCK_BODY BLOCK_BODY
@@ -19,7 +19,7 @@ FILE fqName:<root> fileName:/samConstructors.kt
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun test3 (): IrErrorType declared in <root>'
ERROR_CALL 'Unresolved reference: <Unresolved name: Runnable>#' type=IrErrorType ERROR_CALL 'Unresolved reference: <Unresolved name: Runnable>#' type=IrErrorType
ERROR_CALL 'Unresolved reference: <Unresolved name: foo>#' type=IrErrorType ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: foo>#' type=IrErrorType
FUN name:test4 visibility:public modality:FINAL <> () returnType:IrErrorType FUN name:test4 visibility:public modality:FINAL <> () returnType:IrErrorType
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (): IrErrorType declared in <root>' RETURN type=kotlin.Nothing from='public final fun test4 (): IrErrorType declared in <root>'
@@ -83,4 +83,4 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
BLOCK_BODY BLOCK_BODY
CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null CALL 'public open fun run1 (r: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.J' type=<root>.J origin=null $this: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.J' type=<root>.J origin=null
r: ERROR_CALL 'Unresolved reference: <Unresolved name: test9>#' type=IrErrorType r: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: test9>#' type=IrErrorType
@@ -6,23 +6,23 @@ FILE fqName:<root> fileName:/samOperators.kt
BLOCK_BODY BLOCK_BODY
CALL 'public open fun get (k: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null CALL 'public open fun get (k: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J $this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J
k: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType k: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
CALL 'public open fun get (k: java.lang.Runnable?, m: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null CALL 'public open fun get (k: java.lang.Runnable?, m: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J $this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J
k: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType k: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
m: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType m: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
FUN name:test2 visibility:public modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Unit FUN name:test2 visibility:public modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:<root>.J $receiver: VALUE_PARAMETER name:<this> type:<root>.J
BLOCK_BODY BLOCK_BODY
CALL 'public open fun set (k: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null CALL 'public open fun set (k: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J $this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J
k: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType k: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
v: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType v: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
CALL 'public open fun set (k: java.lang.Runnable?, m: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null CALL 'public open fun set (k: java.lang.Runnable?, m: java.lang.Runnable?, v: java.lang.Runnable?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J $this: ERROR_CALL 'Unresolved reference: this#' type=<root>.J
k: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType k: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
m: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType m: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
v: ERROR_CALL 'Unresolved reference: <Unresolved name: f>#' type=IrErrorType v: ERROR_CALL 'Unsupported callable reference: ::<Unresolved name: f>#' type=IrErrorType
FUN name:test3 visibility:public modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Unit FUN name:test3 visibility:public modality:FINAL <> ($receiver:<root>.J) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:<root>.J $receiver: VALUE_PARAMETER name:<this> type:<root>.J
BLOCK_BODY BLOCK_BODY
@@ -56,11 +56,11 @@ FILE fqName:<root> fileName:/genericPropertyReferenceType.kt
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'public final fun use (p: kotlin.reflect.KMutableProperty<kotlin.String>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null CALL 'public final fun use (p: kotlin.reflect.KMutableProperty<kotlin.String>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
p: CALL 'public final fun <get-y> (): IrErrorType declared in <root>' type=IrErrorType origin=null p: PROPERTY_REFERENCE 'public final y: IrErrorType [var]' field=null getter='public final fun <get-y> (): IrErrorType declared in <root>' setter='public final fun <set-y> (v: IrErrorType): kotlin.Unit declared in <root>' type=IrErrorType origin=null
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY BLOCK_BODY
TYPE_OP type=<root>.C<kotlin.String> origin=CAST typeOperand=<root>.C<kotlin.String> TYPE_OP type=<root>.C<kotlin.String> origin=CAST typeOperand=<root>.C<kotlin.String>
GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
CALL 'public final fun use (p: kotlin.reflect.KMutableProperty<kotlin.String>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null CALL 'public final fun use (p: kotlin.reflect.KMutableProperty<kotlin.String>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
p: ERROR_CALL 'Unresolved reference: <Inapplicable(WRONG_RECEIVER): [/y]>#' type=IrErrorType p: ERROR_CALL 'Unsupported callable reference: R|<local>/a|::<Inapplicable(WRONG_RECEIVER): [/y]>#' type=IrErrorType