[FIR2IR] Automatically store IR declaration in its parent upon creation

Previously, creating a declaration with Fir2IrCallableDeclarationsGenerator/
  Fir2IrClassifiersGenerator didn't guarantee that this declaration will
  be actually added to the list of parent class/file declarations, which
  lead to situations when FIR2IR created some declarations in the air
  (mostly fake-overrides)
This commit is contained in:
Dmitriy Novozhilov
2023-10-05 12:39:13 +03:00
committed by Space Team
parent 22f55b3dc4
commit 3d6ec0ec75
96 changed files with 417 additions and 2062 deletions
@@ -9,21 +9,16 @@ import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
import org.jetbrains.kotlin.descriptors.Visibilities
import org.jetbrains.kotlin.descriptors.Visibility
import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.declarations.utils.classId
import org.jetbrains.kotlin.fir.declarations.utils.visibility
import org.jetbrains.kotlin.fir.expressions.FirAnonymousObjectExpression
import org.jetbrains.kotlin.fir.lazy.Fir2IrLazyClass
import org.jetbrains.kotlin.fir.resolve.providers.firProvider
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
import org.jetbrains.kotlin.fir.resolve.providers.toSymbol
import org.jetbrains.kotlin.fir.resolve.toSymbol
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhaseWithCallableMembers
import org.jetbrains.kotlin.fir.types.FirTypeRef
import org.jetbrains.kotlin.fir.types.toLookupTag
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.symbols.IrSymbol
@@ -31,10 +26,8 @@ import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
import org.jetbrains.kotlin.ir.symbols.impl.IrFieldSymbolImpl
import org.jetbrains.kotlin.ir.symbols.impl.IrTypeParameterSymbolImpl
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.name.SpecialNames
import org.jetbrains.kotlin.name.StandardClassIds
class Fir2IrClassifierStorage(
private val components: Fir2IrComponents,
@@ -14,11 +14,14 @@ import org.jetbrains.kotlin.backend.common.actualizer.FakeOverrideRebuilder
import org.jetbrains.kotlin.backend.common.sourceElement
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.config.LanguageFeature
import org.jetbrains.kotlin.descriptors.ClassKind
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.fir.*
import org.jetbrains.kotlin.fir.analysis.checkers.toRegularClassSymbol
import org.jetbrains.kotlin.fir.backend.generators.DataClassMembersGenerator
import org.jetbrains.kotlin.fir.backend.generators.addDeclarationToParent
import org.jetbrains.kotlin.fir.backend.generators.setParent
import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.declarations.utils.isLocal
import org.jetbrains.kotlin.fir.declarations.utils.isSynthetic
@@ -165,20 +168,29 @@ class Fir2IrConverter(
}
private fun processClassHeaders(file: FirFile) {
val irFile = declarationStorage.getIrFile(file)
file.declarations.forEach {
when (it) {
is FirRegularClass -> processClassAndNestedClassHeaders(it)
is FirTypeAlias -> classifierStorage.createAndCacheIrTypeAlias(it, declarationStorage.getIrFile(file))
is FirTypeAlias -> {
classifierStorage.createAndCacheIrTypeAlias(it, irFile)
}
else -> {}
}
}
/*
* This is needed to preserve the source order of declarations in the file
* IrFile should contain declarations in the source order, but creating of IrClass automatically adds created class to the list
* of file declaration. And in this step we skip all callables, so by default all classes will be declared before all callables
* To fix this issue the list of declarations is cleared at this point, and later it will be filled again in `processClassMembers`
*/
irFile.declarations.clear()
}
private fun processFileAndClassMembers(file: FirFile) {
val irFile = declarationStorage.getIrFile(file)
for (declaration in file.declarations) {
val irDeclaration = processMemberDeclaration(declaration, null, irFile) ?: continue
irFile.declarations += irDeclaration
processMemberDeclaration(declaration, null, irFile)
}
}
@@ -188,6 +200,13 @@ class Fir2IrConverter(
) {
registerNestedClasses(anonymousObject, irClass)
processNestedClassHeaders(anonymousObject)
/*
* This is needed to preserve the source order of declarations in the class
* IrClass should contain declarations in the source order, but creating of nested IrClass automatically adds created class to the list
* of class declaration. And in this step we skip all callables, so by default all classes will be declared before all callables
* To fix this issue the list of declarations is cleared at this point, and later it will be filled again in `processClassMembers`
*/
irClass.declarations.clear()
}
internal fun processClassMembers(klass: FirClass, irClass: IrClass): IrClass {
@@ -198,18 +217,15 @@ class Fir2IrConverter(
addAll(klass.generatedNestedClassifiers(session))
}
}
irClass.declarations.addAll(classifierStorage.getFieldsWithContextReceiversForClass(irClass, klass))
val irConstructor = klass.primaryConstructorIfAny(session)?.let {
declarationStorage.getOrCreateIrConstructor(
it.fir, irClass, isLocal = klass.isLocal
)
}
if (irConstructor != null) {
irClass.declarations += irConstructor
declarationStorage.getOrCreateIrConstructor(it.fir, irClass, isLocal = klass.isLocal)
}
// At least on enum entry creation we may need a default constructor, so ctors should be converted first
for (declaration in syntheticPropertiesLast(allDeclarations)) {
val irDeclaration = processMemberDeclaration(declaration, klass, irClass) ?: continue
irClass.declarations += irDeclaration
processMemberDeclaration(declaration, klass, irClass)
}
// Add delegated members *before* fake override generations.
// Otherwise, fake overrides for delegated members, which are redundant, will be added.
@@ -231,23 +247,20 @@ class Fir2IrConverter(
declarationStorage.leaveScope(irConstructor.symbol)
}
with(fakeOverrideGenerator) {
irClass.addFakeOverrides(klass, allDeclarations)
irClass.computeFakeOverrides(klass, allDeclarations)
}
return irClass
}
private fun processCodeFragmentMembers(
codeFragment: FirCodeFragment,
irClass: IrClass = classifierStorage.getCachedIrCodeFragment(codeFragment)!!
): IrClass {
private fun processCodeFragmentMembers(codeFragment: FirCodeFragment, irClass: IrClass): IrClass {
val conversionData = codeFragment.conversionData
declarationStorage.enterScope(irClass.symbol)
val signature = irClass.symbol.signature!!
val irPrimaryConstructor = symbolTable.declareConstructor(signature, { IrConstructorPublicSymbolImpl(signature) }) { irSymbol ->
symbolTable.declareConstructor(signature, { IrConstructorPublicSymbolImpl(signature) }) { irSymbol ->
irFactory.createConstructor(
UNDEFINED_OFFSET, UNDEFINED_OFFSET,
IrDeclarationOrigin.DEFINED,
@@ -260,7 +273,8 @@ class Fir2IrConverter(
isExternal = false,
isPrimary = true
).apply {
parent = irClass
setParent(irClass)
addDeclarationToParent(this, irClass)
val firAnyConstructor = session.builtinTypes.anyType.toRegularClassSymbol(session)!!.fir.primaryConstructorIfAny(session)!!
val irAnyConstructor = declarationStorage.getIrConstructorSymbol(firAnyConstructor)
body = irFactory.createBlockBody(UNDEFINED_OFFSET, UNDEFINED_OFFSET).apply {
@@ -275,7 +289,7 @@ class Fir2IrConverter(
}
}
val irFragmentFunction = symbolTable.declareSimpleFunction(signature, { IrSimpleFunctionPublicSymbolImpl(signature) }) { irSymbol ->
symbolTable.declareSimpleFunction(signature, { IrSimpleFunctionPublicSymbolImpl(signature) }) { irSymbol ->
val lastStatement = codeFragment.block.statements.lastOrNull()
val returnType = (lastStatement as? FirExpression)?.resolvedType?.toIrType(typeConverter) ?: irBuiltIns.unitType
@@ -297,7 +311,8 @@ class Fir2IrConverter(
containerSource = null,
isFakeOverride = false
).apply fragmentFunction@{
parent = irClass
setParent(irClass)
addDeclarationToParent(this, irClass)
valueParameters = conversionData.injectedValues.mapIndexed { index, injectedValue ->
val isMutated = injectedValue.isMutated
@@ -320,9 +335,6 @@ class Fir2IrConverter(
}
}
irClass.declarations.add(irPrimaryConstructor)
irClass.declarations.add(irFragmentFunction)
declarationStorage.leaveScope(irClass.symbol)
return irClass
}
@@ -399,6 +411,14 @@ class Fir2IrConverter(
private fun processClassAndNestedClassHeaders(klass: FirClass) {
classifiersGenerator.processClassHeader(klass)
processNestedClassHeaders(klass)
val irClass = classifierStorage.getCachedIrClass(klass)!!
/*
* This is needed to preserve the source order of declarations in the class
* IrClass should contain declarations in the source order, but creating of nested IrClass automatically adds created class to the list
* of class declaration. And in this step we skip all callables, so by default all classes will be declared before all callables
* To fix this issue the list of declarations is cleared at this point, and later it will be filled again in `processFileAndClassMembers`
*/
irClass.declarations.clear()
}
private fun processNestedClassHeaders(klass: FirClass) {
@@ -420,17 +440,28 @@ class Fir2IrConverter(
declaration: FirDeclaration,
containingClass: FirClass?,
parent: IrDeclarationParent
): IrDeclaration? {
val isLocal = containingClass != null &&
(containingClass !is FirRegularClass || containingClass.isLocal)
return when (declaration) {
) {
// This function is needed to preserve the source order of declaration in file
// see the comment in [processClassHeaders] function
fun addDeclarationToParentIfNeeded(irDeclaration: IrDeclaration) {
when (parent) {
is IrFile -> parent.declarations += irDeclaration
is IrClass -> parent.declarations += irDeclaration
}
}
val isInLocalClass = containingClass != null && (containingClass !is FirRegularClass || containingClass.isLocal)
when (declaration) {
is FirRegularClass -> {
processClassMembers(declaration, classifierStorage.getCachedIrClass(declaration)!!)
val irClass = classifierStorage.getCachedIrClass(declaration)!!
addDeclarationToParentIfNeeded(irClass)
processClassMembers(declaration, irClass)
}
is FirScript -> {
parent as IrFile
declarationStorage.getOrCreateIrScript(declaration).also { irScript ->
declarationStorage.enterScope(irScript.symbol)
require(parent is IrFile)
val irScript = declarationStorage.getOrCreateIrScript(declaration)
addDeclarationToParentIfNeeded(irScript)
declarationStorage.withScope(irScript.symbol) {
irScript.parent = parent
for (scriptStatement in declaration.statements) {
when (scriptStatement) {
@@ -447,41 +478,31 @@ class Fir2IrConverter(
processMemberDeclaration(scriptStatement, null, irScript)
}
}
declarationStorage.leaveScope(irScript.symbol)
}
}
is FirSimpleFunction -> {
declarationStorage.getOrCreateIrFunction(
declaration, parent, isLocal = isLocal
)
declarationStorage.getOrCreateIrFunction(declaration, parent, isLocal = isInLocalClass)
}
is FirProperty -> {
if (containingClass != null &&
declaration.isEnumEntries(containingClass) &&
!session.languageVersionSettings.supportsFeature(LanguageFeature.EnumEntries)
if (
containingClass == null ||
!declaration.isEnumEntries(containingClass) ||
session.languageVersionSettings.supportsFeature(LanguageFeature.EnumEntries)
) {
// Note: we have to do it, because backend without the feature
// cannot process Enum.entries properly
null
} else {
declarationStorage.getOrCreateIrProperty(
declaration, parent, isLocal = isLocal
)
declarationStorage.getOrCreateIrProperty(declaration, parent, isLocal = isInLocalClass)
}
}
is FirField -> {
if (declaration.isSynthetic) {
callablesGenerator.createIrFieldAndDelegatedMembers(declaration, containingClass!!, parent as IrClass)
} else {
throw AssertionError("Unexpected non-synthetic field: ${declaration::class}")
error("Unexpected non-synthetic field: ${declaration::class}")
}
}
is FirConstructor -> if (!declaration.isPrimary) {
declarationStorage.getOrCreateIrConstructor(
declaration, parent as IrClass, isLocal = isLocal
)
} else {
null
declarationStorage.getOrCreateIrConstructor(declaration, parent as IrClass, isLocal = isInLocalClass)
}
is FirEnumEntry -> {
classifierStorage.getOrCreateIrEnumEntry(declaration, parent as IrClass)
@@ -490,11 +511,15 @@ class Fir2IrConverter(
declarationStorage.getOrCreateIrAnonymousInitializer(declaration, parent as IrClass)
}
is FirTypeAlias -> {
// DO NOTHING
null
classifierStorage.getCachedTypeAlias(declaration)?.let { irTypeAlias ->
// type alias may be local with error suppression, so it might be missing from classifier storage
addDeclarationToParentIfNeeded(irTypeAlias)
}
}
is FirCodeFragment -> {
processCodeFragmentMembers(declaration)
val codeFragmentClass = classifierStorage.getCachedIrCodeFragment(declaration)!!
processCodeFragmentMembers(declaration, codeFragmentClass)
addDeclarationToParentIfNeeded(codeFragmentClass)
}
else -> {
error("Unexpected member: ${declaration::class}")
@@ -202,7 +202,6 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) : Fir2IrCompon
toStringContributedFunction,
components.irBuiltIns.stringType,
)
irClass.declarations.add(toStringFunction)
declarationStorage.cacheGeneratedFunction(toStringContributedFunction, toStringFunction)
}
@@ -214,7 +213,6 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) : Fir2IrCompon
hashcodeNameContributedFunction,
components.irBuiltIns.intType,
)
irClass.declarations.add(hashCodeFunction)
declarationStorage.cacheGeneratedFunction(hashcodeNameContributedFunction, hashCodeFunction)
}
@@ -228,7 +226,6 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) : Fir2IrCompon
otherParameterNeeded = true,
isOperator = true
)
irClass.declarations.add(equalsFunction)
declarationStorage.cacheGeneratedFunction(equalsContributedFunction, equalsFunction)
}
@@ -329,7 +326,8 @@ class DataClassMembersGenerator(val components: Fir2IrComponents) : Fir2IrCompon
metadata = FirMetadataSource.Function(syntheticCounterpart)
}
}.apply {
parent = irClass
setParent(irClass)
addDeclarationToParent(this, irClass)
dispatchReceiverParameter = generateDispatchReceiverParameter(this)
components.irBuiltIns.findBuiltInClassMemberFunctions(
components.irBuiltIns.anyClass,
@@ -125,7 +125,6 @@ class DelegatedMemberGenerator(private val components: Fir2IrComponents) : Fir2I
bodiesInfo += DeclarationBodyInfo(irSubFunction, irField, delegateToSymbol, delegateToLookupTag)
declarationStorage.cacheDelegationFunction(functionSymbol.fir, irSubFunction)
subClass.addMember(irSubFunction)
}
subClassScope.processAllProperties { propertySymbol ->
@@ -154,7 +153,6 @@ class DelegatedMemberGenerator(private val components: Fir2IrComponents) : Fir2I
)
bodiesInfo += DeclarationBodyInfo(irSubProperty, irField, delegateToSymbol, delegateToLookupTag)
declarationStorage.cacheDelegatedProperty(propertySymbol.fir, irSubProperty)
subClass.addMember(irSubProperty)
}
}
@@ -51,14 +51,7 @@ class FakeOverrideGenerator(
}
}
fun IrClass.addFakeOverrides(klass: FirClass, declarations: Collection<FirDeclaration>) {
this.declarations += getFakeOverrides(
klass,
declarations
)
}
private fun IrClass.getFakeOverrides(klass: FirClass, realDeclarations: Collection<FirDeclaration>): List<IrDeclaration> {
fun IrClass.computeFakeOverrides(klass: FirClass, realDeclarations: Collection<FirDeclaration>) {
val result = mutableListOf<IrDeclaration>()
val useSiteMemberScope = klass.unsubstitutedScope()
@@ -68,7 +61,6 @@ class FakeOverrideGenerator(
for (name in superTypesCallableNames) {
generateFakeOverridesForName(this, useSiteMemberScope, name, klass, result, realDeclarationSymbols)
}
return result
}
fun generateFakeOverridesForName(
@@ -139,7 +139,7 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
if (isLambda) ((function as FirAnonymousFunction).typeRef as? FirResolvedTypeRef)?.type?.isSuspendOrKSuspendFunctionType(session) == true
else function.isSuspend
val created = function.convertWithOffsets { startOffset, endOffset ->
val result = declareIrSimpleFunction(signature) { symbol ->
declareIrSimpleFunction(signature) { symbol ->
classifierStorage.preCacheTypeParameters(function, symbol)
irFactory.createSimpleFunction(
startOffset = if (updatedOrigin == IrDeclarationOrigin.DELEGATED_MEMBER) SYNTHETIC_OFFSET else startOffset,
@@ -161,7 +161,14 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
).apply {
metadata = FirMetadataSource.Function(function)
declarationStorage.withScope(symbol) {
setAndModifyParent(this, irParent)
/*
* `isLocal = true` indicates that a function is local or member of a local class
* containingClassLookupTag allows to distinguish those two cases
*/
setParent(irParent)
if (!(isLocal && function.containingClassLookupTag() == null)) {
addDeclarationToParent(this, irParent)
}
declareParameters(
function, irParent,
dispatchReceiverType = computeDispatchReceiverType(this, simpleFunction, irParent),
@@ -172,7 +179,6 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
}
}
}
result
}
if (visibility == Visibilities.Local) {
@@ -245,7 +251,8 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
@OptIn(LeakedDeclarationCaches::class)
declarationStorage.cacheIrConstructor(constructor, this)
declarationStorage.withScope(symbol) {
setAndModifyParent(this, irParent)
setParent(irParent)
addDeclarationToParent(this, irParent)
declareParameters(constructor, irParent, dispatchReceiverType = null, isStatic = false, forSetter = false)
}
}
@@ -321,9 +328,9 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
metadata = FirMetadataSource.Property(property)
convertAnnotationsForNonDeclaredMembers(property, origin)
declarationStorage.withScope(symbol) {
if (irParent != null) {
parent = irParent
}
// IrProperty is never created for local variables
setParent(irParent)
addDeclarationToParent(this, irParent)
val type = property.returnTypeRef.toIrType()
val delegate = property.delegate
val getter = property.getter
@@ -528,7 +535,9 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
firValueParameter = null
)
}
setAndModifyParent(this, irParent)
// property accessors does not belong to declarations of class/file, but are referenced via property,
// so there is no need to add accessor to list of parents declarations
setParent(irParent)
declareParameters(
propertyAccessor, irParent, dispatchReceiverType,
isStatic = irParent !is IrClass || propertyAccessor?.isStatic == true, forSetter = isSetter,
@@ -651,7 +660,14 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
if (initializer is FirConstExpression<*>) {
this.initializer = factory.createExpressionBody(initializer.toIrConst(irType))
}
setAndModifyParent(this, irParent)
/*
* fields of regular properties are stored inside IrProperty
* fields for delegates (inheritance by delegation) are stored in the corresponding class directly
*/
setParent(irParent)
if (origin == IrDeclarationOrigin.DELEGATE) {
addDeclarationToParent(this, irParent)
}
}
}
}
@@ -981,7 +997,8 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
IrDeclarationOrigin.DEFINED,
irParent.descriptor
).apply {
this.parent = irParent
setParent(irParent)
addDeclarationToParent(this, irParent)
}
}
}
@@ -1051,15 +1068,6 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
}
}
fun setAndModifyParent(declaration: IrDeclaration, irParent: IrDeclarationParent?) {
if (irParent != null) {
declaration.parent = irParent
if (irParent is IrExternalPackageFragment) {
irParent.declarations += declaration
}
}
}
private fun IrMutableAnnotationContainer.convertAnnotationsForNonDeclaredMembers(
firAnnotationContainer: FirAnnotationContainer, origin: IrDeclarationOrigin,
) {
@@ -1082,3 +1090,40 @@ class Fir2IrCallableDeclarationsGenerator(val components: Fir2IrComponents) : Fi
}
}
}
internal fun IrDeclaration.setParent(irParent: IrDeclarationParent?) {
if (irParent != null) {
parent = irParent
}
}
/**
* We should not try to add declaration to list of parents declarations in two cases:
* 1. getters, setters, and backing fields are not stored in parent directly. They are stored in IrProperty instead,
* which is stored in parent
* 2. if a declaration is declared in a local scope (in some body) then it will have contained class/function as a parent. But the declaration
* should be listed in statements list of the corresponding IrBlock instead of IrClass.declarations
* Note that IrClass will be a parent if some declaration is declared inside anonymous initializer, because IrAnonymousInitializer
* is not a IrDeclarationParent
*/
internal fun addDeclarationToParent(declaration: IrDeclaration, irParent: IrDeclarationParent?) {
if (irParent == null) return
when (irParent) {
is Fir2IrLazyClass -> {
/*
* Declaration list of lazy class is lazy by itself, and it will collect and store all required members
* automatically on the first access to Fir2IrLazyClass.declarations
*/
}
is IrClass -> irParent.declarations += declaration
is IrFile -> irParent.declarations += declaration
is IrExternalPackageFragment -> irParent.declarations += declaration
is IrScript -> {
/*
* All declarations of the script will be added during main script conversion
*/
}
else -> error("Can't add declaration ${declaration.render()} to parent ${irParent.render()}")
}
}
@@ -146,7 +146,14 @@ class Fir2IrClassifiersGenerator(val components: Fir2IrComponents) : Fir2IrCompo
}
}
}
irClass.parent = parent
/*
* `regularClass.isLocal` indicates that either class itsef is local or it is a nested class in some other class
* Check for parentClassId allows to distinguish between those cases
*/
irClass.setParent(parent)
if (!(regularClass.isLocal && regularClass.classId.parentClassId == null)) {
addDeclarationToParent(irClass, parent)
}
return irClass
}
@@ -347,9 +354,8 @@ class Fir2IrClassifiersGenerator(val components: Fir2IrComponents) : Fir2IrCompo
).apply {
this.parent = parent
setTypeParameters(this, typeAlias)
if (parent is IrFile) {
parent.declarations += this
}
setParent(parent)
addDeclarationToParent(this, parent)
}
irTypeAlias
}
@@ -382,7 +388,8 @@ class Fir2IrClassifiersGenerator(val components: Fir2IrComponents) : Fir2IrCompo
hasEnumEntries = false,
).apply {
metadata = FirMetadataSource.CodeFragment(codeFragment)
parent = containingFile
setParent(containingFile)
addDeclarationToParent(this, containingFile)
typeParameters = emptyList()
thisReceiver = declareThisReceiverParameter(
thisType = IrSimpleTypeImpl(symbol, false, emptyList(), emptyList()),
@@ -421,7 +428,8 @@ class Fir2IrClassifiersGenerator(val components: Fir2IrComponents) : Fir2IrCompo
symbol = symbol,
).apply {
declarationStorage.enterScope(this.symbol)
this.parent = irParent
setParent(irParent)
addDeclarationToParent(this, irParent)
if (isEnumEntryWhichRequiresSubclass(enumEntry)) {
// An enum entry with its own members requires an anonymous object generated.
// Otherwise, this is a default-ish enum entry whose initializer would be a delegating constructor call,
@@ -72,17 +72,17 @@ FILE fqName:<root> fileName:/selfReferentialAnnotation.kt
receiver: GET_VAR '<this>: <root>.MyRequiresOptIn declared in <root>.MyRequiresOptIn.<get-b>' type=<root>.MyRequiresOptIn origin=null
CLASS ENUM_CLASS name:MyLevel modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.MyRequiresOptIn.MyLevel>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyRequiresOptIn.MyLevel
ENUM_ENTRY name:ERROR
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.MyRequiresOptIn.MyLevel'
ENUM_ENTRY name:WARNING
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.MyRequiresOptIn.MyLevel'
CONSTRUCTOR visibility:private <> () returnType:<root>.MyRequiresOptIn.MyLevel [primary]
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) declared in kotlin.Enum'
<E>: <root>.MyRequiresOptIn.MyLevel
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyLevel modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.MyRequiresOptIn.MyLevel>]'
ENUM_ENTRY name:WARNING
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.MyRequiresOptIn.MyLevel'
ENUM_ENTRY name:ERROR
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.MyRequiresOptIn.MyLevel'
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.MyRequiresOptIn.MyLevel>
SYNTHETIC_BODY kind=ENUM_VALUES
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.MyRequiresOptIn.MyLevel
@@ -114,6 +114,9 @@ FILE fqName:<root> fileName:/delegationToIntersectionType.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.B]'
FIELD DELEGATE name:$$delegate_0 type:<root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'val intersection: <root>.A declared in <root>.test' type=<root>.A origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.test.<no name provided>) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.B
@@ -124,9 +127,6 @@ FILE fqName:<root> fileName:/delegationToIntersectionType.kt
$this: TYPE_OP type=<root>.B origin=IMPLICIT_CAST typeOperand=<root>.B
GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.A visibility:private [final]' type=<root>.A origin=null
receiver: GET_VAR '<this>: <root>.test.<no name provided> declared in <root>.test.<no name provided>.foo' type=<root>.test.<no name provided> origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'val intersection: <root>.A declared in <root>.test' type=<root>.A origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B
@@ -119,6 +119,9 @@ FILE fqName:<root> fileName:/delegationToIntersectionType2.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.A]'
FIELD DELEGATE name:$$delegate_0 type:<root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'val intersection: <root>.A declared in <root>.test' type=<root>.A origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.test.<no name provided>) returnType:kotlin.Any
overridden:
public abstract fun foo (): kotlin.Any declared in <root>.A
@@ -129,9 +132,6 @@ FILE fqName:<root> fileName:/delegationToIntersectionType2.kt
$this: TYPE_OP type=<root>.B origin=IMPLICIT_CAST typeOperand=<root>.B
GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.A visibility:private [final]' type=<root>.A origin=null
receiver: GET_VAR '<this>: <root>.test.<no name provided> declared in <root>.test.<no name provided>.foo' type=<root>.test.<no name provided> origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'val intersection: <root>.A declared in <root>.test' type=<root>.A origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A
@@ -197,6 +197,10 @@ FILE fqName:<root> fileName:/delegatedPropertyWithMultipleOverriddens_generics.k
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MC modality:FINAL visibility:public superTypes:[<root>.MyMutableCollection<kotlin.String>]'
FIELD DELEGATE name:$$delegate_0 type:<root>.MyArrayList<kotlin.String> visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.MyArrayList' type=<root>.MyArrayList<kotlin.String> origin=null
<class: E6>: kotlin.String
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.MC) returnType:kotlin.String
overridden:
public abstract fun foo (): E3 of <root>.MyMutableCollection declared in <root>.MyMutableCollection
@@ -219,10 +223,6 @@ FILE fqName:<root> fileName:/delegatedPropertyWithMultipleOverriddens_generics.k
CALL 'public open fun <get-bar> (): E6 of <root>.MyArrayList declared in <root>.MyArrayList' type=E6 of <root>.MyArrayList origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.MyArrayList<kotlin.String> visibility:private [final]' type=<root>.MyArrayList<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.MC declared in <root>.MC.<get-bar>' type=<root>.MC origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.MyArrayList<kotlin.String> visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.MyArrayList' type=<root>.MyArrayList<kotlin.String> origin=null
<class: E6>: kotlin.String
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyMutableCollection
@@ -188,6 +188,9 @@ FILE fqName:<root> fileName:/delegatedPropertyWithMultipleOverriddens_noGenerics
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MC modality:FINAL visibility:public superTypes:[<root>.MyMutableCollection]'
FIELD DELEGATE name:$$delegate_0 type:<root>.MyArrayList visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.MyArrayList' type=<root>.MyArrayList origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.MC) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.MyMutableCollection
@@ -210,9 +213,6 @@ FILE fqName:<root> fileName:/delegatedPropertyWithMultipleOverriddens_noGenerics
CALL 'public open fun <get-bar> (): kotlin.String declared in <root>.MyArrayList' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.MyArrayList visibility:private [final]' type=<root>.MyArrayList origin=null
receiver: GET_VAR '<this>: <root>.MC declared in <root>.MC.<get-bar>' type=<root>.MC origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.MyArrayList visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.MyArrayList' type=<root>.MyArrayList origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyMutableCollection
@@ -7,8 +7,6 @@
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: KT-62535
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_K2: JVM_IR
// REASON: K2 incorrectly generates IR for B.bar f/o
// MODULE: common
// TARGET_PLATFORM: Common
@@ -2,8 +2,6 @@
// WITH_STDLIB
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: KT-62535
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND_K2: ANY
// REASON: K2 incorrectly generates IR for S2.s3 f/o
// MODULE: common
// TARGET_PLATFORM: Common
@@ -14,6 +14,17 @@ FILE fqName:<root> fileName:/delegationInSealed.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'protected constructor <init> () declared in <root>.A'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[<root>.A; kotlin.CharSequence]'
PROPERTY name:c visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]
EXPRESSION_BODY
GET_VAR 'c: kotlin.CharSequence declared in <root>.A.B.<init>' type=kotlin.CharSequence origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.CharSequence declared in <root>.A.B'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-c>' type=<root>.A.B origin=null
FUN DELEGATED_MEMBER name:get visibility:public modality:OPEN <> ($this:<root>.A.B, index:kotlin.Int) returnType:kotlin.Char [operator]
overridden:
public abstract fun get (index: kotlin.Int): kotlin.Char declared in <root>.A
@@ -55,17 +66,6 @@ FILE fqName:<root> fileName:/delegationInSealed.kt
CALL 'public abstract fun <get-length> (): kotlin.Int declared in kotlin.CharSequence' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-length>' type=<root>.A.B origin=null
PROPERTY name:c visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]
EXPRESSION_BODY
GET_VAR 'c: kotlin.CharSequence declared in <root>.A.B.<init>' type=kotlin.CharSequence origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.CharSequence declared in <root>.A.B'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.<get-c>' type=<root>.A.B origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.A.B) returnType:kotlin.CharSequence [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.A.B
BLOCK_BODY
@@ -12,6 +12,10 @@ sealed class A : CharSequence {
}
val c: CharSequence
field = c
get
override operator fun get(index: Int): Char {
return <this>.#c.get(index = index)
}
@@ -25,10 +29,6 @@ sealed class A : CharSequence {
return <this>.#c.<get-length>()
}
val c: CharSequence
field = c
get
operator fun component1(): CharSequence {
return <this>.#c
}
@@ -46,6 +46,9 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[<root>.IBase<E of <root>.Test1>]'
FIELD DELEGATE name:$$delegate_0 type:<root>.IBase<E of <root>.Test1> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'i: <root>.IBase<E of <root>.Test1> declared in <root>.Test1.<init>' type=<root>.IBase<E of <root>.Test1> origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <B> ($this:<root>.Test1<E of <root>.Test1>, a:E of <root>.Test1, b:B of <root>.Test1.foo) returnType:kotlin.Unit
overridden:
public abstract fun foo <B> (a: A of <root>.IBase, b: B of <root>.IBase.foo): kotlin.Unit declared in <root>.IBase
@@ -109,9 +112,6 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
receiver: GET_VAR '<this>: <root>.Test1<E of <root>.Test1> declared in <root>.Test1.<set-x>' type=<root>.Test1<E of <root>.Test1> origin=null
$receiver: GET_VAR '<this>: kotlin.collections.List<D of <root>.Test1.<set-x>> declared in <root>.Test1.<set-x>' type=kotlin.collections.List<D of <root>.Test1.<set-x>> origin=null
<set-?>: GET_VAR '<set-?>: D of <root>.Test1.<set-x>? declared in <root>.Test1.<set-x>' type=D of <root>.Test1.<set-x>? origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.IBase<E of <root>.Test1> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'i: <root>.IBase<E of <root>.Test1> declared in <root>.Test1.<init>' type=<root>.IBase<E of <root>.Test1> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IBase
@@ -132,6 +132,25 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[<root>.IBase<kotlin.String>]'
PROPERTY name:j visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private
EXPRESSION_BODY
GET_VAR 'j: <root>.IBase<kotlin.String> declared in <root>.Test2.<init>' type=<root>.IBase<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:public modality:FINAL <> ($this:<root>.Test2) returnType:<root>.IBase<kotlin.String>
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-j> (): <root>.IBase<kotlin.String> declared in <root>.Test2'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=<root>.IBase<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-j>' type=<root>.Test2 origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-j> visibility:public modality:FINAL <> ($this:<root>.Test2, <set-?>:<root>.IBase<kotlin.String>) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
VALUE_PARAMETER name:<set-?> index:0 type:<root>.IBase<kotlin.String>
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-j>' type=<root>.Test2 origin=null
value: GET_VAR '<set-?>: <root>.IBase<kotlin.String> declared in <root>.Test2.<set-j>' type=<root>.IBase<kotlin.String> origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <B> ($this:<root>.Test2, a:kotlin.String, b:B of <root>.Test2.foo) returnType:kotlin.Unit
overridden:
public abstract fun foo <B> (a: A of <root>.IBase, b: B of <root>.IBase.foo): kotlin.Unit declared in <root>.IBase
@@ -195,25 +214,6 @@ FILE fqName:<root> fileName:/delegatedGenericImplementation.kt
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-x>' type=<root>.Test2 origin=null
$receiver: GET_VAR '<this>: kotlin.collections.List<D of <root>.Test2.<set-x>> declared in <root>.Test2.<set-x>' type=kotlin.collections.List<D of <root>.Test2.<set-x>> origin=null
<set-?>: GET_VAR '<set-?>: D of <root>.Test2.<set-x>? declared in <root>.Test2.<set-x>' type=D of <root>.Test2.<set-x>? origin=null
PROPERTY name:j visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private
EXPRESSION_BODY
GET_VAR 'j: <root>.IBase<kotlin.String> declared in <root>.Test2.<init>' type=<root>.IBase<kotlin.String> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:public modality:FINAL <> ($this:<root>.Test2) returnType:<root>.IBase<kotlin.String>
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-j> (): <root>.IBase<kotlin.String> declared in <root>.Test2'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=<root>.IBase<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<get-j>' type=<root>.Test2 origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-j> visibility:public modality:FINAL <> ($this:<root>.Test2, <set-?>:<root>.IBase<kotlin.String>) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:j visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
VALUE_PARAMETER name:<set-?> index:0 type:<root>.IBase<kotlin.String>
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.IBase<kotlin.String> visibility:private' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-j>' type=<root>.Test2 origin=null
value: GET_VAR '<set-?>: <root>.IBase<kotlin.String> declared in <root>.Test2.<set-j>' type=<root>.IBase<kotlin.String> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IBase
@@ -17,6 +17,7 @@ class Test1<E : Any?> : IBase<E> {
}
private /* final field */ val $$delegate_0: IBase<E> = i
override fun <B : Any?> foo(a: E, b: B) {
<this>.#$$delegate_0.foo<B>(a = a, b = b)
}
@@ -34,8 +35,6 @@ class Test1<E : Any?> : IBase<E> {
(<this>.#$$delegate_0, <this>).<set-x><D>(<set-?> = <set-?>)
}
private /* final field */ val $$delegate_0: IBase<E> = i
}
class Test2 : IBase<String> {
@@ -45,6 +44,11 @@ class Test2 : IBase<String> {
}
var j: IBase<String>
field = j
get
set
override fun <B : Any?> foo(a: String, b: B) {
<this>.#j.foo<B>(a = a, b = b)
}
@@ -62,9 +66,5 @@ class Test2 : IBase<String> {
(<this>.#j, <this>).<set-x><D>(<set-?> = <set-?>)
}
var j: IBase<String>
field = j
get
set
}
@@ -208,6 +208,9 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[<root>.IBase]'
FIELD DELEGATE name:$$delegate_0 type:<root>.BaseImpl visibility:private [final]
EXPRESSION_BODY
GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.Test1, x:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit
overridden:
public abstract fun foo (x: kotlin.Int, s: kotlin.String): kotlin.Unit declared in <root>.IBase
@@ -239,9 +242,6 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.BaseImpl visibility:private [final]' type=<root>.BaseImpl origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.qux' type=<root>.Test1 origin=null
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Test1.qux' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.BaseImpl visibility:private [final]
EXPRESSION_BODY
GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IBase
@@ -261,6 +261,9 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[<root>.IBase; <root>.IOther]'
FIELD DELEGATE name:$$delegate_0 type:<root>.BaseImpl visibility:private [final]
EXPRESSION_BODY
GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.Test2, x:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit
overridden:
public abstract fun foo (x: kotlin.Int, s: kotlin.String): kotlin.Unit declared in <root>.IBase
@@ -292,9 +295,11 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.BaseImpl visibility:private [final]' type=<root>.BaseImpl origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.qux' type=<root>.Test2 origin=null
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Test2.qux' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.BaseImpl visibility:private [final]
FIELD DELEGATE name:$$delegate_1 type:<root>.IOther visibility:private [final]
EXPRESSION_BODY
GET_OBJECT 'CLASS OBJECT name:BaseImpl modality:FINAL visibility:public superTypes:[<root>.IBase]' type=<root>.BaseImpl
CALL 'public final fun otherImpl (x0: kotlin.String, y0: kotlin.Int): <root>.IOther declared in <root>' type=<root>.IOther origin=null
x0: CONST String type=kotlin.String value=""
y0: CONST Int type=kotlin.Int value=42
PROPERTY DELEGATED_MEMBER name:x visibility:public modality:OPEN [val]
overridden:
public abstract x: kotlin.String
@@ -375,11 +380,6 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.<set-z2>' type=<root>.Test2 origin=null
$receiver: GET_VAR '<this>: kotlin.Byte declared in <root>.Test2.<set-z2>' type=kotlin.Byte origin=null
<set-?>: GET_VAR '<set-?>: kotlin.Int declared in <root>.Test2.<set-z2>' type=kotlin.Int origin=null
FIELD DELEGATE name:$$delegate_1 type:<root>.IOther visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun otherImpl (x0: kotlin.String, y0: kotlin.Int): <root>.IOther declared in <root>' type=<root>.IOther origin=null
x0: CONST String type=kotlin.String value=""
y0: CONST Int type=kotlin.Int value=42
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IBase
@@ -86,6 +86,7 @@ class Test1 : IBase {
}
private /* final field */ val $$delegate_0: BaseImpl = BaseImpl
override fun foo(x: Int, s: String) {
<this>.#$$delegate_0.foo(x = x, s = s)
}
@@ -98,8 +99,6 @@ class Test1 : IBase {
(<this>.#$$delegate_0, <this>).qux()
}
private /* final field */ val $$delegate_0: BaseImpl = BaseImpl
}
class Test2 : IBase, IOther {
@@ -109,6 +108,7 @@ class Test2 : IBase, IOther {
}
private /* final field */ val $$delegate_0: BaseImpl = BaseImpl
override fun foo(x: Int, s: String) {
<this>.#$$delegate_0.foo(x = x, s = s)
}
@@ -121,7 +121,7 @@ class Test2 : IBase, IOther {
(<this>.#$$delegate_0, <this>).qux()
}
private /* final field */ val $$delegate_0: BaseImpl = BaseImpl
private /* final field */ val $$delegate_1: IOther = otherImpl(x0 = "", y0 = 42)
override val x: String
override get(): String {
return <this>.#$$delegate_1.<get-x>()
@@ -148,6 +148,5 @@ class Test2 : IBase, IOther {
(<this>.#$$delegate_1, <this>).<set-z2>(<set-?> = <set-?>)
}
private /* final field */ val $$delegate_1: IOther = otherImpl(x0 = "", y0 = 42)
}
@@ -6,6 +6,17 @@ FILE fqName:<root> fileName:/delegatedImplementationOfJavaInterface.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[<root>.J]'
PROPERTY name:j visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]
EXPRESSION_BODY
GET_VAR 'j: <root>.J declared in <root>.Test.<init>' type=<root>.J origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:private modality:FINAL <> ($this:<root>.Test) returnType:<root>.J
correspondingProperty: PROPERTY name:j visibility:private modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Test
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun <get-j> (): <root>.J declared in <root>.Test'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.<get-j>' type=<root>.Test origin=null
FUN DELEGATED_MEMBER name:takeNotNull visibility:public modality:OPEN <> ($this:<root>.Test, x:@[EnhancedNullability] kotlin.String) returnType:kotlin.Unit
overridden:
public abstract fun takeNotNull (x: @[EnhancedNullability] kotlin.String): kotlin.Unit declared in <root>.J
@@ -72,17 +83,6 @@ FILE fqName:<root> fileName:/delegatedImplementationOfJavaInterface.kt
CALL 'public abstract fun returnsFlexible (): @[FlexibleNullability] kotlin.String? declared in <root>.J' type=@[FlexibleNullability] kotlin.String? origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.returnsFlexible' type=<root>.Test origin=null
PROPERTY name:j visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]
EXPRESSION_BODY
GET_VAR 'j: <root>.J declared in <root>.Test.<init>' type=<root>.J origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-j> visibility:private modality:FINAL <> ($this:<root>.Test) returnType:<root>.J
correspondingProperty: PROPERTY name:j visibility:private modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Test
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun <get-j> (): <root>.J declared in <root>.Test'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:j type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.<get-j>' type=<root>.Test origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.J
@@ -5,6 +5,10 @@ class Test : J {
}
private val j: J
field = j
private get
override fun takeNotNull(@NotNull x: @EnhancedNullability String) {
<this>.#j.takeNotNull(x = x)
}
@@ -31,8 +35,5 @@ class Test : J {
return <this>.#j.returnsFlexible()
}
private val j: J
field = j
private get
}
@@ -1,84 +0,0 @@
FILE fqName:<root> fileName:/delegatedImplementationWithExplicitOverride.kt
CLASS INTERFACE name:IFooBar modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFooBar
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.IFooBar) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.IFooBar
FUN name:bar visibility:public modality:ABSTRACT <> ($this:<root>.IFooBar) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.IFooBar
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:FooBarImpl modality:FINAL visibility:public superTypes:[<root>.IFooBar]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.FooBarImpl
CONSTRUCTOR visibility:private <> () returnType:<root>.FooBarImpl [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:FooBarImpl modality:FINAL visibility:public superTypes:[<root>.IFooBar]'
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.FooBarImpl) returnType:kotlin.Unit
overridden:
public abstract fun foo (): kotlin.Unit declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:<root>.FooBarImpl
BLOCK_BODY
FUN name:bar visibility:public modality:OPEN <> ($this:<root>.FooBarImpl) returnType:kotlin.Unit
overridden:
public abstract fun bar (): kotlin.Unit declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:<root>.FooBarImpl
BLOCK_BODY
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.IFooBar]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> () returnType:<root>.C [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.IFooBar]'
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Unit
overridden:
public abstract fun foo (): kotlin.Unit declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
CALL 'public open fun foo (): kotlin.Unit declared in <root>.FooBarImpl' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.FooBarImpl visibility:private [final]' type=<root>.FooBarImpl origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.foo' type=<root>.C origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.FooBarImpl visibility:private [final]
EXPRESSION_BODY
GET_OBJECT 'CLASS OBJECT name:FooBarImpl modality:FINAL visibility:public superTypes:[<root>.IFooBar]' type=<root>.FooBarImpl
FUN name:bar visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Unit
overridden:
public abstract fun bar (): kotlin.Unit declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.IFooBar
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -1,38 +0,0 @@
interface IFooBar {
abstract fun foo()
abstract fun bar()
}
object FooBarImpl : IFooBar {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun foo() {
}
override fun bar() {
}
}
class C : IFooBar {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun foo() {
<this>.#$$delegate_0.foo()
}
private /* final field */ val $$delegate_0: FooBarImpl = FooBarImpl
override fun bar() {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
interface IFooBar {
fun foo()
fun bar()
@@ -1,94 +0,0 @@
FILE fqName:<root> fileName:/delegatingConstructorCallToTypeAliasConstructor.kt
TYPEALIAS name:CT visibility:public expandedType:<root>.Cell<T of <root>.CT>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:CStr visibility:public expandedType:<root>.Cell<kotlin.String>
CLASS CLASS name:Cell modality:OPEN visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Cell<T of <root>.Cell>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (value:T of <root>.Cell) returnType:<root>.Cell<T of <root>.Cell> [primary]
VALUE_PARAMETER name:value index:0 type:T of <root>.Cell
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Cell modality:OPEN visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: T of <root>.Cell declared in <root>.Cell.<init>' type=T of <root>.Cell origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Cell<T of <root>.Cell>) returnType:T of <root>.Cell
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Cell<T of <root>.Cell>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): T of <root>.Cell declared in <root>.Cell'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private [final]' type=T of <root>.Cell origin=null
receiver: GET_VAR '<this>: <root>.Cell<T of <root>.Cell> declared in <root>.Cell.<get-value>' type=<root>.Cell<T of <root>.Cell> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C1 modality:FINAL visibility:public superTypes:[<root>.Cell<kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C1
CONSTRUCTOR visibility:public <> () returnType:<root>.C1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (value: T of <root>.Cell) declared in <root>.Cell'
<T>: kotlin.String
value: CONST String type=kotlin.String value="O"
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C1 modality:FINAL visibility:public superTypes:[<root>.Cell<kotlin.String>]'
PROPERTY FAKE_OVERRIDE name:value visibility:public modality:FINAL [fake_override,val]
overridden:
public final value: T of <root>.Cell
FUN FAKE_OVERRIDE name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Cell<kotlin.String>) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:value visibility:public modality:FINAL [fake_override,val]
overridden:
public final fun <get-value> (): T of <root>.Cell declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:<root>.Cell<kotlin.String>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C2 modality:FINAL visibility:public superTypes:[<root>.Cell<kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C2
CONSTRUCTOR visibility:public <> () returnType:<root>.C2 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (value: T of <root>.Cell) declared in <root>.Cell'
<T>: kotlin.String
value: CONST String type=kotlin.String value="K"
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C2 modality:FINAL visibility:public superTypes:[<root>.Cell<kotlin.String>]'
PROPERTY FAKE_OVERRIDE name:value visibility:public modality:FINAL [fake_override,val]
overridden:
public final value: T of <root>.Cell
FUN FAKE_OVERRIDE name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Cell<kotlin.String>) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:value visibility:public modality:FINAL [fake_override,val]
overridden:
public final fun <get-value> (): T of <root>.Cell declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:<root>.Cell<kotlin.String>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.Cell
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -1,32 +0,0 @@
typealias CT<T : Any?> = Cell<T>
typealias CStr = Cell<String>
open class Cell<T : Any?> {
constructor(value: T) /* primary */ {
super/*Any*/()
/* <init>() */
}
val value: T
field = value
get
}
class C1 : Cell<String> {
constructor() /* primary */ {
super/*Cell*/<String>(value = "O")
/* <init>() */
}
}
class C2 : Cell<String> {
constructor() /* primary */ {
super/*Cell*/<String>(value = "K")
/* <init>() */
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
open class Cell<T>(val value: T)
typealias CT<T> = Cell<T>
@@ -131,6 +131,9 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestJFoo modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FIELD DELEGATE name:$$delegate_0 type:<root>.JFoo visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.JFoo' type=<root>.JFoo origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestJFoo) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.IFoo
@@ -141,9 +144,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
CALL 'public open fun foo (): @[EnhancedNullability] kotlin.String declared in <root>.JFoo' type=@[EnhancedNullability] kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.JFoo visibility:private [final]' type=<root>.JFoo origin=null
receiver: GET_VAR '<this>: <root>.TestJFoo declared in <root>.TestJFoo.foo' type=<root>.TestJFoo origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.JFoo visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.JFoo' type=<root>.JFoo origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
@@ -163,6 +163,9 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK1 modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FIELD DELEGATE name:$$delegate_0 type:<root>.K1 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K1' type=<root>.K1 origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK1) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.IFoo
@@ -173,9 +176,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
CALL 'public open fun foo (): @[EnhancedNullability] kotlin.String declared in <root>.JFoo' type=@[EnhancedNullability] kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.K1 visibility:private [final]' type=<root>.K1 origin=null
receiver: GET_VAR '<this>: <root>.TestK1 declared in <root>.TestK1.foo' type=<root>.TestK1 origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.K1 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K1' type=<root>.K1 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
@@ -195,6 +195,9 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK2 modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FIELD DELEGATE name:$$delegate_0 type:<root>.K2 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K2' type=<root>.K2 origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK2) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.IFoo
@@ -204,9 +207,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
CALL 'public open fun foo (): kotlin.String declared in <root>.K2' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.K2 visibility:private [final]' type=<root>.K2 origin=null
receiver: GET_VAR '<this>: <root>.TestK2 declared in <root>.TestK2.foo' type=<root>.TestK2 origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.K2 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K2' type=<root>.K2 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
@@ -226,6 +226,9 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK3 modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FIELD DELEGATE name:$$delegate_0 type:<root>.K3 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K3' type=<root>.K3 origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK3) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.IFoo
@@ -235,9 +238,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
CALL 'public open fun foo (): kotlin.String declared in <root>.K3' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.K3 visibility:private [final]' type=<root>.K3 origin=null
receiver: GET_VAR '<this>: <root>.TestK3 declared in <root>.TestK3.foo' type=<root>.TestK3 origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.K3 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K3' type=<root>.K3 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
@@ -257,6 +257,9 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestK4 modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FIELD DELEGATE name:$$delegate_0 type:<root>.K4 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K4' type=<root>.K4 origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.TestK4) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.IFoo
@@ -267,9 +270,6 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in <root>.K4' type=@[FlexibleNullability] kotlin.String? origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.K4 visibility:private [final]' type=<root>.K4 origin=null
receiver: GET_VAR '<this>: <root>.TestK4 declared in <root>.TestK4.foo' type=<root>.TestK4 origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.K4 visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.K4' type=<root>.K4 origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
@@ -54,12 +54,11 @@ class TestJFoo : IFoo {
}
private /* final field */ val $$delegate_0: JFoo = JFoo()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: JFoo = JFoo()
}
class TestK1 : IFoo {
@@ -69,12 +68,11 @@ class TestK1 : IFoo {
}
private /* final field */ val $$delegate_0: K1 = K1()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: K1 = K1()
}
class TestK2 : IFoo {
@@ -84,12 +82,11 @@ class TestK2 : IFoo {
}
private /* final field */ val $$delegate_0: K2 = K2()
override fun foo(): String {
return <this>.#$$delegate_0.foo()
}
private /* final field */ val $$delegate_0: K2 = K2()
}
class TestK3 : IFoo {
@@ -99,12 +96,11 @@ class TestK3 : IFoo {
}
private /* final field */ val $$delegate_0: K3 = K3()
override fun foo(): String {
return <this>.#$$delegate_0.foo()
}
private /* final field */ val $$delegate_0: K3 = K3()
}
class TestK4 : IFoo {
@@ -114,11 +110,10 @@ class TestK4 : IFoo {
}
private /* final field */ val $$delegate_0: K4 = K4()
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: K4 = K4()
}
+3 -3
View File
@@ -6,6 +6,9 @@ FILE fqName:<root> fileName:/kt45934.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.I]'
FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]
EXPRESSION_BODY
GET_VAR 'client: <root>.J declared in <root>.C.<init>' type=<root>.J origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <C> ($this:<root>.C) returnType:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] C of <root>.C.foo?>?
overridden:
public abstract fun foo <C> (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] C of <root>.I.foo?>? declared in <root>.I
@@ -16,9 +19,6 @@ FILE fqName:<root> fileName:/kt45934.kt
CALL 'public open fun foo (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableList<@[FlexibleNullability] kotlin.String?>? origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.foo' type=<root>.C origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]
EXPRESSION_BODY
GET_VAR 'client: <root>.J declared in <root>.C.<init>' type=<root>.J origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.I
@@ -62,6 +62,9 @@ FILE fqName:<root> fileName:/annotationsOnDelegatedMembers.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DFoo modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]
EXPRESSION_BODY
GET_VAR 'd: <root>.IFoo declared in <root>.DFoo.<init>' type=<root>.IFoo origin=null
FUN DELEGATED_MEMBER name:testFun visibility:public modality:OPEN <> ($this:<root>.DFoo) returnType:kotlin.Unit
annotations:
Ann
@@ -112,9 +115,6 @@ FILE fqName:<root> fileName:/annotationsOnDelegatedMembers.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
receiver: GET_VAR '<this>: <root>.DFoo declared in <root>.DFoo.<get-testExtVal>' type=<root>.DFoo origin=null
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.DFoo.<get-testExtVal>' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]
EXPRESSION_BODY
GET_VAR 'd: <root>.IFoo declared in <root>.DFoo.<init>' type=<root>.IFoo origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
@@ -31,6 +31,7 @@ class DFoo : IFoo {
}
private /* final field */ val $$delegate_0: IFoo = d
@Ann
override fun testFun() {
<this>.#$$delegate_0.testFun()
@@ -51,6 +52,5 @@ class DFoo : IFoo {
return (<this>.#$$delegate_0, <this>).<get-testExtVal>()
}
private /* final field */ val $$delegate_0: IFoo = d
}
@@ -1,168 +0,0 @@
FILE fqName:<root> fileName:/inheritingDeprecation.kt
CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
PROPERTY name:prop visibility:public modality:OPEN [val]
annotations:
Deprecated(message = '', replaceWith = <null>, level = <null>)
FUN name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.IFoo) returnType:kotlin.String
correspondingProperty: PROPERTY name:prop visibility:public modality:OPEN [val]
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-prop> (): kotlin.String declared in <root>.IFoo'
CONST String type=kotlin.String value=""
PROPERTY name:extProp visibility:public modality:OPEN [val]
annotations:
Deprecated(message = '', replaceWith = <null>, level = <null>)
FUN name:<get-extProp> visibility:public modality:OPEN <> ($this:<root>.IFoo, $receiver:kotlin.String) returnType:kotlin.String
correspondingProperty: PROPERTY name:extProp visibility:public modality:OPEN [val]
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-extProp> (): kotlin.String declared in <root>.IFoo'
CONST String type=kotlin.String value=""
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Delegated modality:FINAL visibility:public superTypes:[<root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegated
CONSTRUCTOR visibility:public <> (foo:<root>.IFoo) returnType:<root>.Delegated [primary]
VALUE_PARAMETER name:foo index:0 type:<root>.IFoo
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegated modality:FINAL visibility:public superTypes:[<root>.IFoo]'
PROPERTY DELEGATED_MEMBER name:prop visibility:public modality:OPEN [val]
overridden:
public open prop: kotlin.String
FUN DELEGATED_MEMBER name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.String
correspondingProperty: PROPERTY DELEGATED_MEMBER name:prop visibility:public modality:OPEN [val]
overridden:
public open fun <get-prop> (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-prop> (): kotlin.String declared in <root>.Delegated'
CALL 'public open fun <get-prop> (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<get-prop>' type=<root>.Delegated origin=null
PROPERTY DELEGATED_MEMBER name:extProp visibility:public modality:OPEN [val]
overridden:
public open extProp: kotlin.String
FUN DELEGATED_MEMBER name:<get-extProp> visibility:public modality:OPEN <> ($this:<root>.Delegated, $receiver:kotlin.String) returnType:kotlin.String
correspondingProperty: PROPERTY DELEGATED_MEMBER name:extProp visibility:public modality:OPEN [val]
overridden:
public open fun <get-extProp> (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-extProp> (): kotlin.String declared in <root>.Delegated'
CALL 'public open fun <get-extProp> (): kotlin.String declared in <root>.IFoo' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]' type=<root>.IFoo origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.<get-extProp>' type=<root>.Delegated origin=null
$receiver: GET_VAR '<this>: kotlin.String declared in <root>.Delegated.<get-extProp>' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.IFoo visibility:private [final]
EXPRESSION_BODY
GET_VAR 'foo: <root>.IFoo declared in <root>.Delegated.<init>' type=<root>.IFoo origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:DefaultImpl modality:FINAL visibility:public superTypes:[<root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.DefaultImpl
CONSTRUCTOR visibility:public <> () returnType:<root>.DefaultImpl [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DefaultImpl modality:FINAL visibility:public superTypes:[<root>.IFoo]'
PROPERTY FAKE_OVERRIDE name:prop visibility:public modality:OPEN [fake_override,val]
annotations:
Deprecated(message = '', replaceWith = <null>, level = <null>)
overridden:
public open prop: kotlin.String
FUN FAKE_OVERRIDE name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.IFoo) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:prop visibility:public modality:OPEN [fake_override,val]
overridden:
public open fun <get-prop> (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
PROPERTY FAKE_OVERRIDE name:extProp visibility:public modality:OPEN [fake_override,val]
annotations:
Deprecated(message = '', replaceWith = <null>, level = <null>)
overridden:
public open extProp: kotlin.String
FUN FAKE_OVERRIDE name:<get-extProp> visibility:public modality:OPEN <> ($this:<root>.IFoo, $receiver:kotlin.String) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:extProp visibility:public modality:OPEN [fake_override,val]
overridden:
public open fun <get-extProp> (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:ExplicitOverride modality:FINAL visibility:public superTypes:[<root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.ExplicitOverride
CONSTRUCTOR visibility:public <> () returnType:<root>.ExplicitOverride [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ExplicitOverride modality:FINAL visibility:public superTypes:[<root>.IFoo]'
PROPERTY name:prop visibility:public modality:OPEN [val]
overridden:
public open prop: kotlin.String
FUN name:<get-prop> visibility:public modality:OPEN <> ($this:<root>.ExplicitOverride) returnType:kotlin.String
correspondingProperty: PROPERTY name:prop visibility:public modality:OPEN [val]
overridden:
public open fun <get-prop> (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.ExplicitOverride
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-prop> (): kotlin.String declared in <root>.ExplicitOverride'
CONST String type=kotlin.String value=""
PROPERTY name:extProp visibility:public modality:OPEN [val]
overridden:
public open extProp: kotlin.String
FUN name:<get-extProp> visibility:public modality:OPEN <> ($this:<root>.ExplicitOverride, $receiver:kotlin.String) returnType:kotlin.String
correspondingProperty: PROPERTY name:extProp visibility:public modality:OPEN [val]
overridden:
public open fun <get-extProp> (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.ExplicitOverride
$receiver: VALUE_PARAMETER name:<this> type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun <get-extProp> (): kotlin.String declared in <root>.ExplicitOverride'
CONST String type=kotlin.String value=""
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -1,63 +0,0 @@
interface IFoo {
@Deprecated(message = "")
val prop: String
get(): String {
return ""
}
@Deprecated(message = "")
val String.extProp: String
get(): String {
return ""
}
}
class Delegated : IFoo {
constructor(foo: IFoo) /* primary */ {
super/*Any*/()
/* <init>() */
}
override val prop: String
override get(): String {
return <this>.#$$delegate_0.<get-prop>()
}
override val String.extProp: String
override get(): String {
return (<this>.#$$delegate_0, <this>).<get-extProp>()
}
private /* final field */ val $$delegate_0: IFoo = foo
}
class DefaultImpl : IFoo {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class ExplicitOverride : IFoo {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override val prop: String
override get(): String {
return ""
}
override val String.extProp: String
override get(): String {
return ""
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
interface IFoo {
@Deprecated("")
val prop: String get() = ""
@@ -1,37 +0,0 @@
FILE fqName:<root> fileName:/typeAliasesWithAnnotations.kt
TYPEALIAS name:TestTypeAlias visibility:public expandedType:kotlin.String
annotations:
TestAnn(x = 'TestTypeAlias')
CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]
annotations:
Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPEALIAS' type=kotlin.annotation.AnnotationTarget])
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAnn
CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:<root>.TestAnn [primary]
VALUE_PARAMETER name:x index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: kotlin.String declared in <root>.TestAnn.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.TestAnn) returnType:kotlin.String
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.TestAnn
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.String declared in <root>.TestAnn'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.TestAnn declared in <root>.TestAnn.<get-x>' type=<root>.TestAnn origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -1,15 +0,0 @@
@TestAnn(x = "TestTypeAlias")
typealias TestTypeAlias = String
@Target(allowedTargets = [AnnotationTarget.TYPEALIAS])
open annotation class TestAnn : Annotation {
constructor(x: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: String
field = x
get
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
@Target(AnnotationTarget.TYPEALIAS)
annotation class TestAnn(val x: String)
@@ -116,6 +116,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.DerivedBase'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived modality:FINAL visibility:public superTypes:[foo.DerivedBase; foo.Base]'
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:foo.Derived, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun foo (x: kotlin.String): kotlin.String declared in foo.Base
@@ -127,9 +130,6 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]' type=foo.Base origin=null
receiver: GET_VAR '<this>: foo.Derived declared in foo.Derived.foo' type=foo.Derived origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived.foo' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun <set-global> (<set-?>: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ
@@ -158,6 +158,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.DerivedBase'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[foo.Base; foo.DerivedBase]'
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:foo.Derived1, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun foo (x: kotlin.String): kotlin.String declared in foo.Base
@@ -169,9 +172,6 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]' type=foo.Base origin=null
receiver: GET_VAR '<this>: foo.Derived1 declared in foo.Derived1.foo' type=foo.Derived1 origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived1.foo' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun <set-global> (<set-?>: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ
@@ -52,11 +52,11 @@ class Derived : DerivedBase, Base {
}
private /* final field */ val $$delegate_0: Base = newBase()
override fun foo(x: String): String {
return <this>.#$$delegate_0.foo(x = x)
}
private /* final field */ val $$delegate_0: Base = newBase()
init {
<set-global>(<set-?> = <get-global>().plus(other = ":Derived"))
}
@@ -70,11 +70,11 @@ class Derived1 : Base, DerivedBase {
}
private /* final field */ val $$delegate_0: Base = newBase()
override fun foo(x: String): String {
return <this>.#$$delegate_0.foo(x = x)
}
private /* final field */ val $$delegate_0: Base = newBase()
init {
<set-global>(<set-?> = <get-global>().plus(other = ":Derived"))
}
@@ -187,6 +187,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.DerivedBase'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived modality:FINAL visibility:public superTypes:[foo.DerivedBase; foo.Base; foo.Base2]'
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:foo.Derived, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun foo (x: kotlin.String): kotlin.String declared in foo.Base
@@ -198,9 +201,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]' type=foo.Base origin=null
receiver: GET_VAR '<this>: foo.Derived declared in foo.Derived.foo' type=foo.Derived origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived.foo' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
CALL 'public final fun newBase2 (): foo.Base2 declared in foo' type=foo.Base2 origin=null
FUN DELEGATED_MEMBER name:bar visibility:public modality:OPEN <> ($this:foo.Derived, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun bar (x: kotlin.String): kotlin.String declared in foo.Base2
@@ -212,9 +215,6 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]' type=foo.Base2 origin=null
receiver: GET_VAR '<this>: foo.Derived declared in foo.Derived.bar' type=foo.Derived origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived.bar' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase2 (): foo.Base2 declared in foo' type=foo.Base2 origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun <set-global> (<set-?>: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ
@@ -246,6 +246,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.DerivedBase'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived1 modality:FINAL visibility:public superTypes:[foo.Base; foo.DerivedBase; foo.Base2]'
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:foo.Derived1, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun foo (x: kotlin.String): kotlin.String declared in foo.Base
@@ -257,9 +260,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]' type=foo.Base origin=null
receiver: GET_VAR '<this>: foo.Derived1 declared in foo.Derived1.foo' type=foo.Derived1 origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived1.foo' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
CALL 'public final fun newBase2 (): foo.Base2 declared in foo' type=foo.Base2 origin=null
FUN DELEGATED_MEMBER name:bar visibility:public modality:OPEN <> ($this:foo.Derived1, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun bar (x: kotlin.String): kotlin.String declared in foo.Base2
@@ -271,9 +274,6 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]' type=foo.Base2 origin=null
receiver: GET_VAR '<this>: foo.Derived1 declared in foo.Derived1.bar' type=foo.Derived1 origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived1.bar' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase2 (): foo.Base2 declared in foo' type=foo.Base2 origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun <set-global> (<set-?>: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ
@@ -305,6 +305,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.DerivedBase'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived2 modality:FINAL visibility:public superTypes:[foo.Base; foo.Base2; foo.DerivedBase]'
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:foo.Derived2, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun foo (x: kotlin.String): kotlin.String declared in foo.Base
@@ -316,9 +319,9 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]' type=foo.Base origin=null
receiver: GET_VAR '<this>: foo.Derived2 declared in foo.Derived2.foo' type=foo.Derived2 origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived2.foo' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:foo.Base visibility:private [final]
FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase (): foo.Base declared in foo' type=foo.Base origin=null
CALL 'public final fun newBase2 (): foo.Base2 declared in foo' type=foo.Base2 origin=null
FUN DELEGATED_MEMBER name:bar visibility:public modality:OPEN <> ($this:foo.Derived2, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun bar (x: kotlin.String): kotlin.String declared in foo.Base2
@@ -330,9 +333,6 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]' type=foo.Base2 origin=null
receiver: GET_VAR '<this>: foo.Derived2 declared in foo.Derived2.bar' type=foo.Derived2 origin=null
x: GET_VAR 'x: kotlin.String declared in foo.Derived2.bar' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_1 type:foo.Base2 visibility:private [final]
EXPRESSION_BODY
CALL 'public final fun newBase2 (): foo.Base2 declared in foo' type=foo.Base2 origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun <set-global> (<set-?>: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ
@@ -79,16 +79,16 @@ class Derived : DerivedBase, Base, Base2 {
}
private /* final field */ val $$delegate_0: Base = newBase()
override fun foo(x: String): String {
return <this>.#$$delegate_0.foo(x = x)
}
private /* final field */ val $$delegate_0: Base = newBase()
private /* final field */ val $$delegate_1: Base2 = newBase2()
override fun bar(x: String): String {
return <this>.#$$delegate_1.bar(x = x)
}
private /* final field */ val $$delegate_1: Base2 = newBase2()
init {
<set-global>(<set-?> = <get-global>().plus(other = ":Derived"))
}
@@ -102,16 +102,16 @@ class Derived1 : Base, DerivedBase, Base2 {
}
private /* final field */ val $$delegate_0: Base = newBase()
override fun foo(x: String): String {
return <this>.#$$delegate_0.foo(x = x)
}
private /* final field */ val $$delegate_0: Base = newBase()
private /* final field */ val $$delegate_1: Base2 = newBase2()
override fun bar(x: String): String {
return <this>.#$$delegate_1.bar(x = x)
}
private /* final field */ val $$delegate_1: Base2 = newBase2()
init {
<set-global>(<set-?> = <get-global>().plus(other = ":Derived"))
}
@@ -125,16 +125,16 @@ class Derived2 : Base, Base2, DerivedBase {
}
private /* final field */ val $$delegate_0: Base = newBase()
override fun foo(x: String): String {
return <this>.#$$delegate_0.foo(x = x)
}
private /* final field */ val $$delegate_0: Base = newBase()
private /* final field */ val $$delegate_1: Base2 = newBase2()
override fun bar(x: String): String {
return <this>.#$$delegate_1.bar(x = x)
}
private /* final field */ val $$delegate_1: Base2 = newBase2()
init {
<set-global>(<set-?> = <get-global>().plus(other = ":Derived"))
}
@@ -30,6 +30,9 @@ FILE fqName:<root> fileName:/kt35550.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<root>.I]'
FIELD DELEGATE name:$$delegate_0 type:<root>.I visibility:private [final]
EXPRESSION_BODY
GET_VAR 'i: <root>.I declared in <root>.A.<init>' type=<root>.I origin=null
PROPERTY DELEGATED_MEMBER name:id visibility:public modality:OPEN [val]
overridden:
public open id: T of <root>.I.<get-id>
@@ -47,9 +50,6 @@ FILE fqName:<root> fileName:/kt35550.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.I visibility:private [final]' type=<root>.I origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-id>' type=<root>.A origin=null
$receiver: GET_VAR '<this>: T of <root>.A.<get-id> declared in <root>.A.<get-id>' type=T of <root>.A.<get-id> origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.I visibility:private [final]
EXPRESSION_BODY
GET_VAR 'i: <root>.I declared in <root>.A.<init>' type=<root>.I origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.I
@@ -13,11 +13,10 @@ class A : I {
}
private /* final field */ val $$delegate_0: I = i
override val <T : Any?> T.id: T
override get(): T {
return (<this>.#$$delegate_0, <this>).<get-id><T>()
}
private /* final field */ val $$delegate_0: I = i
}
@@ -1,186 +0,0 @@
FILE fqName:<root> fileName:/kt52677.kt
TYPEALIAS name:Uuid visibility:public expandedType:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1
CLASS ANNOTATION_CLASS name:MySerializable modality:OPEN visibility:public superTypes:[kotlin.Annotation]
annotations:
Target(allowedTargets = [GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TYPE' type=kotlin.annotation.AnnotationTarget])
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MySerializable
CONSTRUCTOR visibility:public <> (c:kotlin.reflect.KClass<*>) returnType:<root>.MySerializable [primary]
VALUE_PARAMETER name:c index:0 type:kotlin.reflect.KClass<*>
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:MySerializable modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:c visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.reflect.KClass<*> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'c: kotlin.reflect.KClass<*> declared in <root>.MySerializable.<init>' type=kotlin.reflect.KClass<*> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-c> visibility:public modality:FINAL <> ($this:<root>.MySerializable) returnType:kotlin.reflect.KClass<*>
correspondingProperty: PROPERTY name:c visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.MySerializable
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-c> (): kotlin.reflect.KClass<*> declared in <root>.MySerializable'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.reflect.KClass<*> visibility:private [final]' type=kotlin.reflect.KClass<*> origin=null
receiver: GET_VAR '<this>: <root>.MySerializable declared in <root>.MySerializable.<get-c>' type=<root>.MySerializable origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:LoginSuccessPacket modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.LoginSuccessPacket
CONSTRUCTOR visibility:public <> (id:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1) returnType:<root>.LoginSuccessPacket [primary]
VALUE_PARAMETER name:id index:0 type:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:LoginSuccessPacket modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:id visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 visibility:private [final]
EXPRESSION_BODY
GET_VAR 'id: @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>.LoginSuccessPacket.<init>' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-id> visibility:public modality:FINAL <> ($this:<root>.LoginSuccessPacket) returnType:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1
correspondingProperty: PROPERTY name:id visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-id> (): @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>.LoginSuccessPacket'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.<get-id>' type=<root>.LoginSuccessPacket origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.LoginSuccessPacket) returnType:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>.LoginSuccessPacket'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.component1' type=<root>.LoginSuccessPacket origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.LoginSuccessPacket, id:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1) returnType:<root>.LoginSuccessPacket
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
VALUE_PARAMETER name:id index:0 type:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1
EXPRESSION_BODY
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.copy' type=<root>.LoginSuccessPacket origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (id: @[MySerializable(c = ...)] <root>.Uuid1): <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket'
CONSTRUCTOR_CALL 'public constructor <init> (id: @[MySerializable(c = ...)] <root>.Uuid1) declared in <root>.LoginSuccessPacket' type=<root>.LoginSuccessPacket origin=null
id: GET_VAR 'id: @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>.LoginSuccessPacket.copy' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.LoginSuccessPacket'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="LoginSuccessPacket("
CONST String type=kotlin.String value="id="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.toString' type=<root>.LoginSuccessPacket origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.LoginSuccessPacket'
CALL 'public open fun hashCode (): kotlin.Int declared in <root>.Uuid1' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.hashCode' type=<root>.LoginSuccessPacket origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.LoginSuccessPacket, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.LoginSuccessPacket
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
BLOCK_BODY
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.equals' type=<root>.LoginSuccessPacket origin=null
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.LoginSuccessPacket.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.LoginSuccessPacket'
CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.LoginSuccessPacket
GET_VAR 'other: kotlin.Any? declared in <root>.LoginSuccessPacket.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.LoginSuccessPacket'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.LoginSuccessPacket [val]
TYPE_OP type=<root>.LoginSuccessPacket origin=CAST typeOperand=<root>.LoginSuccessPacket
GET_VAR 'other: kotlin.Any? declared in <root>.LoginSuccessPacket.equals' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.equals' type=<root>.LoginSuccessPacket origin=null
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR 'val tmp_0: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.equals' type=<root>.LoginSuccessPacket origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.LoginSuccessPacket'
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.LoginSuccessPacket'
CONST Boolean type=kotlin.Boolean value=true
CLASS INTERFACE name:MySerializer modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MySerializer<T of <root>.MySerializer>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.UuidSerializer
CONSTRUCTOR visibility:private <> () returnType:<root>.UuidSerializer [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MySerializer
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.MySerializer
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.MySerializer
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Uuid1 modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Uuid1
CONSTRUCTOR visibility:public <> () returnType:<root>.Uuid1 [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Uuid1 modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:FINAL <> () returnType:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1
BLOCK_BODY
THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.RuntimeException' type=java.lang.RuntimeException origin=null
FUN name:bar visibility:public modality:FINAL <> () returnType:@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun bar (): @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>'
CALL 'public final fun foo (): @[MySerializable(c = ...)] <root>.Uuid1 declared in <root>' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
@@ -1,88 +0,0 @@
typealias Uuid = @MySerializable(c = UuidSerializer::class) Uuid1
@Target(allowedTargets = [AnnotationTarget.TYPE])
open annotation class MySerializable : Annotation {
constructor(c: KClass<*>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val c: KClass<*>
field = c
get
}
data class LoginSuccessPacket {
constructor(id: @MySerializable(c = UuidSerializer::class) Uuid1) /* primary */ {
super/*Any*/()
/* <init>() */
}
val id: @MySerializable(c = UuidSerializer::class) Uuid1
field = id
get
operator fun component1(): @MySerializable(c = UuidSerializer::class) Uuid1 {
return <this>.#id
}
fun copy(id: @MySerializable(c = UuidSerializer::class) Uuid1 = <this>.#id): LoginSuccessPacket {
return LoginSuccessPacket(id = id)
}
override fun toString(): String {
return "LoginSuccessPacket(" + "id=" + <this>.#id + ")"
}
override fun hashCode(): Int {
return <this>.#id.hashCode()
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
}
when {
other !is LoginSuccessPacket -> return false
}
val tmp_0: LoginSuccessPacket = other as LoginSuccessPacket
when {
EQEQ(arg0 = <this>.#id, arg1 = tmp_0.#id).not() -> return false
}
return true
}
}
interface MySerializer<T : Any?> {
}
object UuidSerializer : MySerializer<@MySerializable(c = UuidSerializer::class) Uuid1> {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Uuid1 {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun foo(): @MySerializable(c = UuidSerializer::class) Uuid1 {
throw RuntimeException()
}
fun bar(): @MySerializable(c = UuidSerializer::class) Uuid1 {
return foo()
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// ISSUE: KT-52677
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
@@ -35,6 +35,9 @@ FILE fqName:<root> fileName:/delegatedMembers.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test modality:FINAL visibility:public superTypes:[<root>.IBase<TT of <root>.Test>]'
FIELD DELEGATE name:$$delegate_0 type:<root>.IBase<TT of <root>.Test> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'impl: <root>.IBase<TT of <root>.Test> declared in <root>.Test.<init>' type=<root>.IBase<TT of <root>.Test> origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.Test<TT of <root>.Test>, x:kotlin.Int) returnType:kotlin.Unit
overridden:
public abstract fun foo (x: kotlin.Int): kotlin.Unit declared in <root>.IBase
@@ -72,9 +75,6 @@ FILE fqName:<root> fileName:/delegatedMembers.kt
CALL 'public abstract fun <get-bar> (): kotlin.Int declared in <root>.IBase' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.IBase<TT of <root>.Test> visibility:private [final]' type=<root>.IBase<TT of <root>.Test> origin=null
receiver: GET_VAR '<this>: <root>.Test<TT of <root>.Test> declared in <root>.Test.<get-bar>' type=<root>.Test<TT of <root>.Test> origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.IBase<TT of <root>.Test> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'impl: <root>.IBase<TT of <root>.Test> declared in <root>.Test.<init>' type=<root>.IBase<TT of <root>.Test> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IBase
@@ -15,6 +15,7 @@ class Test<TT : Any?> : IBase<TT> {
}
private /* final field */ val $$delegate_0: IBase<TT> = impl
override fun foo(x: Int) {
<this>.#$$delegate_0.foo(x = x)
}
@@ -28,6 +29,5 @@ class Test<TT : Any?> : IBase<TT> {
return <this>.#$$delegate_0.<get-bar>()
}
private /* final field */ val $$delegate_0: IBase<TT> = impl
}
@@ -1,7 +1,4 @@
FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
TYPEALIAS name:KR visibility:public expandedType:<root>.KRunnable
TYPEALIAS name:KSS visibility:public expandedType:<root>.KSupplier<kotlin.String>
TYPEALIAS name:KCS visibility:public expandedType:<root>.KConsumer<kotlin.String>
CLASS INTERFACE name:KRunnable modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KRunnable
FUN name:run visibility:public modality:ABSTRACT <> ($this:<root>.KRunnable) returnType:kotlin.Unit
@@ -19,6 +16,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:KR visibility:public expandedType:<root>.KRunnable
CLASS INTERFACE name:KSupplier modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KSupplier<T of <root>.KSupplier>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
@@ -37,6 +35,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:KSS visibility:public expandedType:<root>.KSupplier<kotlin.String>
CLASS INTERFACE name:KConsumer modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.KConsumer<T of <root>.KConsumer>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
@@ -56,6 +55,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:KCS visibility:public expandedType:<root>.KConsumer<kotlin.String>
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> declared in <root>'
@@ -1,21 +1,21 @@
typealias KR = KRunnable
typealias KSS = KSupplier<String>
typealias KCS = KConsumer<String>
fun interface KRunnable {
abstract fun run()
}
typealias KR = KRunnable
fun interface KSupplier<T : Any?> {
abstract fun get(): T
}
typealias KSS = KSupplier<String>
fun interface KConsumer<T : Any?> {
abstract fun accept(x: T)
}
typealias KCS = KConsumer<String>
fun test1(): KFunction1<Function0<Unit>, KRunnable> {
return { // BLOCK
local fun KRunnable(function: Function0<Unit>): KRunnable {
+1 -1
View File
@@ -1,5 +1,4 @@
FILE fqName:<root> fileName:/kt16905.kt
TYPEALIAS name:OI visibility:public expandedType:<root>.Outer.Inner
CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer
CONSTRUCTOR visibility:public <> () returnType:<root>.Outer [primary]
@@ -81,6 +80,7 @@ FILE fqName:<root> fileName:/kt16905.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:OI visibility:public expandedType:<root>.Outer.Inner
FUN name:test visibility:public modality:FINAL <> () returnType:<root>.Outer.Inner
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Outer.Inner declared in <root>'
+1 -1
View File
@@ -1,4 +1,3 @@
typealias OI = Inner
class Outer {
constructor() /* primary */ {
super/*Any*/()
@@ -35,6 +34,7 @@ class Outer {
}
typealias OI = Inner
fun test(): Inner {
return Outer().Inner()
}
@@ -1,40 +0,0 @@
FILE fqName:<root> fileName:/specializedTypeAliasConstructorCall.kt
TYPEALIAS name:IntAlias visibility:public expandedType:<root>.Cell<kotlin.Int>
CLASS CLASS name:Cell modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Cell<T of <root>.Cell>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (value:T of <root>.Cell) returnType:<root>.Cell<T of <root>.Cell> [primary]
VALUE_PARAMETER name:value index:0 type:T of <root>.Cell
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Cell modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: T of <root>.Cell declared in <root>.Cell.<init>' type=T of <root>.Cell origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.Cell<T of <root>.Cell>) returnType:T of <root>.Cell
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Cell<T of <root>.Cell>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): T of <root>.Cell declared in <root>.Cell'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Cell visibility:private [final]' type=T of <root>.Cell origin=null
receiver: GET_VAR '<this>: <root>.Cell<T of <root>.Cell> declared in <root>.Cell.<get-value>' type=<root>.Cell<T of <root>.Cell> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:test visibility:public modality:FINAL <> () returnType:<root>.Cell<kotlin.Int>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Cell<kotlin.Int> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (value: T of <root>.Cell) declared in <root>.Cell' type=<root>.Cell<kotlin.Int> origin=null
<class: T>: kotlin.Int
value: CONST Int type=kotlin.Int value=42
@@ -1,17 +0,0 @@
typealias IntAlias = Cell<Int>
class Cell<T : Any?> {
constructor(value: T) /* primary */ {
super/*Any*/()
/* <init>() */
}
val value: T
field = value
get
}
fun test(): Cell<Int> {
return Cell<Int>(value = 42)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Cell<T>(val value: T)
typealias IntAlias = Cell<Int>
@@ -1,6 +1,4 @@
FILE fqName:<root> fileName:/typeAliasConstructorReference.kt
TYPEALIAS name:CA visibility:public expandedType:<root>.C
TYPEALIAS name:NA visibility:public expandedType:<root>.Host.Nested
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:<root>.C [primary]
@@ -21,6 +19,7 @@ FILE fqName:<root> fileName:/typeAliasConstructorReference.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:CA visibility:public expandedType:<root>.C
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
@@ -60,6 +59,7 @@ FILE fqName:<root> fileName:/typeAliasConstructorReference.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:NA visibility:public expandedType:<root>.Host.Nested
PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, <root>.C> visibility:private [final,static]
EXPRESSION_BODY
@@ -1,5 +1,3 @@
typealias CA = C
typealias NA = Nested
class C {
constructor(x: Int) /* primary */ {
super/*Any*/()
@@ -9,6 +7,7 @@ class C {
}
typealias CA = C
object Host {
private constructor() /* primary */ {
super/*Any*/()
@@ -27,6 +26,7 @@ object Host {
}
typealias NA = Nested
val test1: Function1<Int, C>
field = C::<init>
get
@@ -108,6 +108,9 @@ FILE fqName:<root> fileName:/AnnotationLoader.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Visitor]'
FIELD DELEGATE name:$$delegate_0 type:<root>.Visitor visibility:private [final]
EXPRESSION_BODY
GET_VAR 'val visitor: <root>.Visitor declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation' type=<root>.Visitor origin=null
FUN DELEGATED_MEMBER name:visitArray visibility:public modality:OPEN <> ($this:<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>) returnType:<root>.Visitor?
overridden:
public open fun visitArray (): <root>.Visitor? declared in <root>.Visitor
@@ -126,9 +129,6 @@ FILE fqName:<root> fileName:/AnnotationLoader.kt
CALL 'public open fun visitAnnotation (): <root>.Visitor? declared in <root>.Visitor' type=<root>.Visitor? origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Visitor visibility:private [final]' type=<root>.Visitor origin=null
receiver: GET_VAR '<this>: <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided> declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>.visitAnnotation' type=<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided> origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.Visitor visibility:private [final]
EXPRESSION_BODY
GET_VAR 'val visitor: <root>.Visitor declared in <root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation' type=<root>.Visitor origin=null
FUN name:visit visibility:public modality:OPEN <> ($this:<root>.AnnotationLoader.loadAnnotation.<no name provided>.visitAnnotation.<no name provided>) returnType:kotlin.Unit
overridden:
public abstract fun visit (): kotlin.Unit declared in <root>.Visitor
@@ -59,6 +59,7 @@ class AnnotationLoader {
}
private /* final field */ val $$delegate_0: Visitor = visitor
override fun visitArray(): Visitor? {
return <this>.#$$delegate_0.visitArray()
}
@@ -67,7 +68,6 @@ class AnnotationLoader {
return <this>.#$$delegate_0.visitAnnotation()
}
private /* final field */ val $$delegate_0: Visitor = visitor
override fun visit() {
}
@@ -87,3 +87,4 @@ class AnnotationLoader {
}
}
@@ -6,6 +6,9 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Impl modality:FINAL visibility:public superTypes:[<root>.Foo.A; <root>.Foo.B]'
FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: <root>.Foo.B declared in <root>.Impl.<init>' type=<root>.Foo.B origin=null
FUN DELEGATED_MEMBER name:add visibility:public modality:OPEN <> ($this:<root>.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean
overridden:
public abstract fun add (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean declared in <root>.Foo.A
@@ -134,9 +137,6 @@ FILE fqName:<root> fileName:/DelegationAndInheritanceFromJava.kt
CALL 'public abstract fun <get-size> (): kotlin.Int declared in kotlin.collections.Set' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]' type=<root>.Foo.B origin=null
receiver: GET_VAR '<this>: <root>.Impl declared in <root>.Impl.<get-size>' type=<root>.Impl origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.Foo.B visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: <root>.Foo.B declared in <root>.Impl.<init>' type=<root>.Foo.B origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Foo.A
@@ -5,6 +5,7 @@ class Impl : A, B {
}
private /* final field */ val $$delegate_0: B = b
override fun add(element: @FlexibleNullability String?): Boolean {
return <this>.#$$delegate_0.add(element = element)
}
@@ -50,10 +51,9 @@ class Impl : A, B {
return <this>.#$$delegate_0.<get-size>()
}
private /* final field */ val $$delegate_0: B = b
}
fun box(): String {
return "OK"
}
@@ -1,90 +0,0 @@
FILE fqName:<root> fileName:/ErrorInDefaultValue.kt
CLASS INTERFACE name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
FUN name:f visibility:public modality:ABSTRACT <> ($this:<root>.A, x:kotlin.String) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:x index:0 type:kotlin.String
EXPRESSION_BODY
CONST String type=kotlin.String value="OK"
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:B modality:FINAL visibility:public superTypes:[<root>.A]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
CONSTRUCTOR visibility:public <> () returnType:<root>.B [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public superTypes:[<root>.A]'
FUN name:f visibility:public modality:OPEN <> ($this:<root>.B, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun f (x: kotlin.String): kotlin.String declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:x index:0 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun f (x: kotlin.String): kotlin.String declared in <root>.B'
GET_VAR 'x: kotlin.String declared in <root>.B.f' type=kotlin.String origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.A]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> (x:<root>.A) returnType:<root>.C [primary]
VALUE_PARAMETER name:x index:0 type:<root>.A
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.A]'
FUN DELEGATED_MEMBER name:f visibility:public modality:OPEN <> ($this:<root>.C, x:kotlin.String) returnType:kotlin.String
overridden:
public abstract fun f (x: kotlin.String): kotlin.String declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:x index:0 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun f (x: kotlin.String): kotlin.String declared in <root>.C'
CALL 'public abstract fun f (x: kotlin.String): kotlin.String declared in <root>.A' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:<root>.A visibility:private [final]' type=<root>.A origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.f' type=<root>.C origin=null
x: GET_VAR 'x: kotlin.String declared in <root>.C.f' type=kotlin.String origin=null
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:<root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: <root>.A declared in <root>.C.<init>' type=<root>.A origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.C) returnType:<root>.A
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): <root>.A declared in <root>.C'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:<root>.A visibility:private [final]' type=<root>.A origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.<get-x>' type=<root>.C origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -1,34 +0,0 @@
interface A {
abstract fun f(x: String = "OK"): String
}
class B : A {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun f(x: String): String {
return x
}
}
class C : A {
constructor(x: A) /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun f(x: String): String {
return <this>.#x.f(x = x)
}
val x: A
field = x
get
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
interface A {
fun f(x: String = "OK"): String
}
@@ -54,6 +54,10 @@ FILE fqName:<root> fileName:/FakeOverrideInAnonymousWithDelegation.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Bar]'
FIELD DELEGATE name:$$delegate_0 type:<root>.Wrapper.dummy.<no name provided> visibility:private [final]
EXPRESSION_BODY
CALL 'private final fun <get-dummy> (): <root>.Wrapper.dummy.<no name provided> declared in <root>.Wrapper' type=<root>.Wrapper.dummy.<no name provided> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Wrapper declared in <root>.Wrapper' type=<root>.Wrapper origin=null
PROPERTY DELEGATED_MEMBER name:foo visibility:public modality:OPEN [val]
overridden:
public open foo: kotlin.String
@@ -67,10 +71,6 @@ FILE fqName:<root> fileName:/FakeOverrideInAnonymousWithDelegation.kt
CALL 'public open fun <get-foo> (): kotlin.String declared in <root>.Bar' type=kotlin.String origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Wrapper.dummy.<no name provided> visibility:private [final]' type=<root>.Wrapper.dummy.<no name provided> origin=null
receiver: GET_VAR '<this>: <root>.Wrapper.bar.<no name provided> declared in <root>.Wrapper.bar.<no name provided>.<get-foo>' type=<root>.Wrapper.bar.<no name provided> origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.Wrapper.dummy.<no name provided> visibility:private [final]
EXPRESSION_BODY
CALL 'private final fun <get-dummy> (): <root>.Wrapper.dummy.<no name provided> declared in <root>.Wrapper' type=<root>.Wrapper.dummy.<no name provided> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Wrapper declared in <root>.Wrapper' type=<root>.Wrapper origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Bar
@@ -29,13 +29,12 @@ class Wrapper {
}
private /* final field */ val $$delegate_0: <no name provided> = <this>.<get-dummy>()
override val foo: String
override get(): String {
return <this>.#$$delegate_0.<get-foo>()
}
private /* final field */ val $$delegate_0: <no name provided> = <this>.<get-dummy>()
}
<no name provided>()
@@ -51,3 +50,4 @@ interface Bar {
}
}
@@ -116,6 +116,17 @@ FILE fqName:<root> fileName:/Fir2IrClassifierStorage.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Fir2IrClassifierStorage modality:FINAL visibility:public superTypes:[<root>.Fir2IrComponents]'
PROPERTY name:components visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:components type:<root>.Fir2IrComponents visibility:private [final]
EXPRESSION_BODY
GET_VAR 'components: <root>.Fir2IrComponents declared in <root>.Fir2IrClassifierStorage.<init>' type=<root>.Fir2IrComponents origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-components> visibility:private modality:FINAL <> ($this:<root>.Fir2IrClassifierStorage) returnType:<root>.Fir2IrComponents
correspondingProperty: PROPERTY name:components visibility:private modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Fir2IrClassifierStorage
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun <get-components> (): <root>.Fir2IrComponents declared in <root>.Fir2IrClassifierStorage'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:components type:<root>.Fir2IrComponents visibility:private [final]' type=<root>.Fir2IrComponents origin=null
receiver: GET_VAR '<this>: <root>.Fir2IrClassifierStorage declared in <root>.Fir2IrClassifierStorage.<get-components>' type=<root>.Fir2IrClassifierStorage origin=null
PROPERTY DELEGATED_MEMBER name:session visibility:public modality:OPEN [val]
overridden:
public abstract session: <root>.FirSession
@@ -142,17 +153,6 @@ FILE fqName:<root> fileName:/Fir2IrClassifierStorage.kt
CALL 'public abstract fun <get-classifierStorage> (): <root>.Fir2IrClassifierStorage declared in <root>.Fir2IrComponents' type=<root>.Fir2IrClassifierStorage origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:components type:<root>.Fir2IrComponents visibility:private [final]' type=<root>.Fir2IrComponents origin=null
receiver: GET_VAR '<this>: <root>.Fir2IrClassifierStorage declared in <root>.Fir2IrClassifierStorage.<get-classifierStorage>' type=<root>.Fir2IrClassifierStorage origin=null
PROPERTY name:components visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:components type:<root>.Fir2IrComponents visibility:private [final]
EXPRESSION_BODY
GET_VAR 'components: <root>.Fir2IrComponents declared in <root>.Fir2IrClassifierStorage.<init>' type=<root>.Fir2IrComponents origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-components> visibility:private modality:FINAL <> ($this:<root>.Fir2IrClassifierStorage) returnType:<root>.Fir2IrComponents
correspondingProperty: PROPERTY name:components visibility:private modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Fir2IrClassifierStorage
BLOCK_BODY
RETURN type=kotlin.Nothing from='private final fun <get-components> (): <root>.Fir2IrComponents declared in <root>.Fir2IrClassifierStorage'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:components type:<root>.Fir2IrComponents visibility:private [final]' type=<root>.Fir2IrComponents origin=null
receiver: GET_VAR '<this>: <root>.Fir2IrClassifierStorage declared in <root>.Fir2IrClassifierStorage.<get-components>' type=<root>.Fir2IrClassifierStorage origin=null
PROPERTY name:name visibility:private modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]
EXPRESSION_BODY
@@ -44,6 +44,10 @@ class Fir2IrClassifierStorage : Fir2IrComponents {
}
private val components: Fir2IrComponents
field = components
private get
override val session: FirSession
override get(): FirSession {
return <this>.#components.<get-session>()
@@ -54,10 +58,6 @@ class Fir2IrClassifierStorage : Fir2IrComponents {
return <this>.#components.<get-classifierStorage>()
}
private val components: Fir2IrComponents
field = components
private get
private val name: String
field = <this>.<get-session>().<get-name>()
private get
@@ -90,15 +90,6 @@ FILE fqName:<root> fileName:/SignatureClash.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DataClass modality:FINAL visibility:public [data] superTypes:[<root>.Derived; <root>.Delegate]'
FUN DELEGATED_MEMBER name:bar visibility:public modality:OPEN <> ($this:<root>.DataClass) returnType:kotlin.Unit
overridden:
public abstract fun bar (): kotlin.Unit declared in <root>.Derived
public abstract fun bar (): kotlin.Unit declared in <root>.Delegate
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
BLOCK_BODY
CALL 'public abstract fun bar (): kotlin.Unit declared in <root>.Delegate' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.bar' type=<root>.DataClass origin=null
PROPERTY name:delegate visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]
EXPRESSION_BODY
@@ -110,6 +101,15 @@ FILE fqName:<root> fileName:/SignatureClash.kt
RETURN type=kotlin.Nothing from='public final fun <get-delegate> (): <root>.Delegate declared in <root>.DataClass'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.<get-delegate>' type=<root>.DataClass origin=null
FUN DELEGATED_MEMBER name:bar visibility:public modality:OPEN <> ($this:<root>.DataClass) returnType:kotlin.Unit
overridden:
public abstract fun bar (): kotlin.Unit declared in <root>.Derived
public abstract fun bar (): kotlin.Unit declared in <root>.Delegate
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
BLOCK_BODY
CALL 'public abstract fun bar (): kotlin.Unit declared in <root>.Delegate' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.bar' type=<root>.DataClass origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.DataClass) returnType:<root>.Delegate [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.DataClass
BLOCK_BODY
@@ -36,14 +36,14 @@ data class DataClass : Derived, Delegate {
}
override fun bar() {
<this>.#delegate.bar()
}
val delegate: Delegate
field = delegate
get
override fun bar() {
<this>.#delegate.bar()
}
operator fun component1(): Delegate {
return <this>.#delegate
}
@@ -1,148 +0,0 @@
FILE fqName:<root> fileName:/TypeAliasConstructorParameterMapping.kt
TYPEALIAS name:OneToOne visibility:public expandedType:<root>.Box1<A of <root>.OneToOne>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:OneToTwo visibility:public expandedType:<root>.Box2<A of <root>.OneToTwo, A of <root>.OneToTwo>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:TwoToTwo visibility:public expandedType:<root>.Box2<A of <root>.TwoToTwo, B of <root>.TwoToTwo>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:TwoToTwoReversed visibility:public expandedType:<root>.Box2<B of <root>.TwoToTwoReversed, A of <root>.TwoToTwoReversed>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:TwoToOne visibility:public expandedType:<root>.Box1<A of <root>.TwoToOne>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:OneToOneTransitive visibility:public expandedType:<root>.Box1<A of <root>.OneToOneTransitive>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:TwoToTwoTransitive visibility:public expandedType:<root>.Box2<A of <root>.TwoToTwoTransitive, A of <root>.TwoToTwoTransitive>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:TwoToTwoTransitive2 visibility:public expandedType:<root>.Box2<B of <root>.TwoToTwoTransitive2, B of <root>.TwoToTwoTransitive2>
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:B index:1 variance: superTypes:[kotlin.Any?] reified:false
CLASS CLASS name:Box1 modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Box1<T of <root>.Box1>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:<root>.Box1<T of <root>.Box1> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box1 modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Box2 modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Box2<T of <root>.Box2, R of <root>.Box2>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPE_PARAMETER name:R index:1 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:<root>.Box2<T of <root>.Box2, R of <root>.Box2> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Box2 modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:<root>.Box1<kotlin.Int> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box1' type=<root>.Box1<kotlin.Int> origin=null
<class: T>: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:<root>.Box1<kotlin.Int>
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): <root>.Box1<kotlin.Int> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:<root>.Box1<kotlin.Int> visibility:private [final,static]' type=<root>.Box1<kotlin.Int> origin=null
PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:<root>.Box2<kotlin.Int, kotlin.Int> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box2' type=<root>.Box2<kotlin.Int, kotlin.Int> origin=null
<class: T>: kotlin.Int
<class: R>: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:<root>.Box2<kotlin.Int, kotlin.Int>
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): <root>.Box2<kotlin.Int, kotlin.Int> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:<root>.Box2<kotlin.Int, kotlin.Int> visibility:private [final,static]' type=<root>.Box2<kotlin.Int, kotlin.Int> origin=null
PROPERTY name:test3 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test3 type:<root>.Box2<kotlin.Int, kotlin.String> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box2' type=<root>.Box2<kotlin.Int, kotlin.String> origin=null
<class: T>: kotlin.Int
<class: R>: kotlin.String
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test3> visibility:public modality:FINAL <> () returnType:<root>.Box2<kotlin.Int, kotlin.String>
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test3> (): <root>.Box2<kotlin.Int, kotlin.String> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test3 type:<root>.Box2<kotlin.Int, kotlin.String> visibility:private [final,static]' type=<root>.Box2<kotlin.Int, kotlin.String> origin=null
PROPERTY name:test4 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test4 type:<root>.Box2<kotlin.String, kotlin.Int> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box2' type=<root>.Box2<kotlin.String, kotlin.Int> origin=null
<class: T>: kotlin.String
<class: R>: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test4> visibility:public modality:FINAL <> () returnType:<root>.Box2<kotlin.String, kotlin.Int>
correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test4> (): <root>.Box2<kotlin.String, kotlin.Int> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:<root>.Box2<kotlin.String, kotlin.Int> visibility:private [final,static]' type=<root>.Box2<kotlin.String, kotlin.Int> origin=null
PROPERTY name:test5 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test5 type:<root>.Box1<kotlin.Int> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box1' type=<root>.Box1<kotlin.Int> origin=null
<class: T>: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test5> visibility:public modality:FINAL <> () returnType:<root>.Box1<kotlin.Int>
correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test5> (): <root>.Box1<kotlin.Int> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:<root>.Box1<kotlin.Int> visibility:private [final,static]' type=<root>.Box1<kotlin.Int> origin=null
PROPERTY name:test6 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test6 type:<root>.Box1<kotlin.Int> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box1' type=<root>.Box1<kotlin.Int> origin=null
<class: T>: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test6> visibility:public modality:FINAL <> () returnType:<root>.Box1<kotlin.Int>
correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test6> (): <root>.Box1<kotlin.Int> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:<root>.Box1<kotlin.Int> visibility:private [final,static]' type=<root>.Box1<kotlin.Int> origin=null
PROPERTY name:test7 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test7 type:<root>.Box2<kotlin.Int, kotlin.Int> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box2' type=<root>.Box2<kotlin.Int, kotlin.Int> origin=null
<class: T>: kotlin.Int
<class: R>: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test7> visibility:public modality:FINAL <> () returnType:<root>.Box2<kotlin.Int, kotlin.Int>
correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test7> (): <root>.Box2<kotlin.Int, kotlin.Int> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test7 type:<root>.Box2<kotlin.Int, kotlin.Int> visibility:private [final,static]' type=<root>.Box2<kotlin.Int, kotlin.Int> origin=null
PROPERTY name:test8 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test8 type:<root>.Box2<kotlin.String, kotlin.String> visibility:private [final,static]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Box2' type=<root>.Box2<kotlin.String, kotlin.String> origin=null
<class: T>: kotlin.String
<class: R>: kotlin.String
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test8> visibility:public modality:FINAL <> () returnType:<root>.Box2<kotlin.String, kotlin.String>
correspondingProperty: PROPERTY name:test8 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test8> (): <root>.Box2<kotlin.String, kotlin.String> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test8 type:<root>.Box2<kotlin.String, kotlin.String> visibility:private [final,static]' type=<root>.Box2<kotlin.String, kotlin.String> origin=null
@@ -1,57 +0,0 @@
typealias OneToOne<A : Any?> = Box1<A>
typealias OneToTwo<A : Any?> = Box2<A, A>
typealias TwoToTwo<A : Any?, B : Any?> = Box2<A, B>
typealias TwoToTwoReversed<A : Any?, B : Any?> = Box2<B, A>
typealias TwoToOne<A : Any?, B : Any?> = Box1<A>
typealias OneToOneTransitive<A : Any?> = Box1<A>
typealias TwoToTwoTransitive<A : Any?, B : Any?> = Box2<A, A>
typealias TwoToTwoTransitive2<A : Any?, B : Any?> = Box2<B, B>
class Box1<T : Any?> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class Box2<T : Any?, R : Any?> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
val test1: Box1<Int>
field = Box1<Int>()
get
val test2: Box2<Int, Int>
field = Box2<Int, Int>()
get
val test3: Box2<Int, String>
field = Box2<Int, String>()
get
val test4: Box2<String, Int>
field = Box2<String, Int>()
get
val test5: Box1<Int>
field = Box1<Int>()
get
val test6: Box1<Int>
field = Box1<Int>()
get
val test7: Box2<Int, Int>
field = Box2<Int, Int>()
get
val test8: Box2<String, String>
field = Box2<String, String>()
get
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
+11 -11
View File
@@ -8,6 +8,17 @@ FILE fqName:<root> fileName:/kt43342.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ControlFlowInfo modality:OPEN visibility:public superTypes:[kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>]'
PROPERTY name:map visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'map: kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo.<init>' type=kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-map> visibility:public modality:FINAL <> ($this:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>) returnType:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>
correspondingProperty: PROPERTY name:map visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-map> (): kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=null
receiver: GET_VAR '<this>: <root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo.<get-map>' type=<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=null
FUN DELEGATED_MEMBER name:containsKey visibility:public modality:OPEN <> ($this:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>, key:K of <root>.ControlFlowInfo) returnType:kotlin.Boolean
overridden:
public abstract fun containsKey (key: K of kotlin.collections.Map): kotlin.Boolean declared in kotlin.collections.Map
@@ -102,17 +113,6 @@ FILE fqName:<root> fileName:/kt43342.kt
CALL 'public abstract fun <get-values> (): kotlin.collections.Collection<V of kotlin.collections.Map> declared in kotlin.collections.Map' type=kotlin.collections.Collection<V of kotlin.collections.Map> origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=null
receiver: GET_VAR '<this>: <root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo.<get-values>' type=<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=null
PROPERTY name:map visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'map: kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo.<init>' type=kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-map> visibility:public modality:FINAL <> ($this:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>) returnType:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>
correspondingProperty: PROPERTY name:map visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-map> (): kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:map type:kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> visibility:private [final]' type=kotlin.collections.Map<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=null
receiver: GET_VAR '<this>: <root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> declared in <root>.ControlFlowInfo.<get-map>' type=<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.collections.Map
@@ -5,6 +5,10 @@ open class ControlFlowInfo<K : Any?, V : Any?> : Map<K, V> {
}
val map: Map<K, V>
field = map
get
override fun containsKey(key: K): Boolean {
return <this>.#map.containsKey(key = key)
}
@@ -40,6 +40,10 @@ FILE fqName:<root> fileName:/substitutionOverrideWithDelegate.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:DelegatedB modality:OPEN visibility:public superTypes:[<root>.B<kotlin.String>]'
FIELD DELEGATE name:$$delegate_0 type:<root>.C<kotlin.String> visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C<kotlin.String> origin=null
<class: T>: kotlin.String
FUN DELEGATED_MEMBER name:invoke visibility:public modality:OPEN <> ($this:<root>.DelegatedB) returnType:kotlin.Unit [operator]
overridden:
public open fun invoke (): kotlin.Unit declared in <root>.B
@@ -58,10 +62,6 @@ FILE fqName:<root> fileName:/substitutionOverrideWithDelegate.kt
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.C<kotlin.String> visibility:private [final]' type=<root>.C<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.DelegatedB declared in <root>.DelegatedB.invoke' type=<root>.DelegatedB origin=null
value: GET_VAR 'value: kotlin.String declared in <root>.DelegatedB.invoke' type=kotlin.String origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.C<kotlin.String> visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.C' type=<root>.C<kotlin.String> origin=null
<class: T>: kotlin.String
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.B
@@ -22,6 +22,7 @@ open class DelegatedB : B<String> {
}
private /* final field */ val $$delegate_0: C<String> = C<String>()
override operator fun invoke() {
<this>.#$$delegate_0.invoke()
}
@@ -30,8 +31,6 @@ open class DelegatedB : B<String> {
<this>.#$$delegate_0.invoke(value = value)
}
private /* final field */ val $$delegate_0: C<String> = C<String>()
}
interface B<out T : Any?> : A {
@@ -46,3 +45,4 @@ class C<out T : Any?> : B<T> {
}
}
@@ -1,97 +0,0 @@
FILE fqName:<root> fileName:/integerCoercionToT.kt
TYPEALIAS name:CInt32Var visibility:public expandedType:<root>.CInt32VarX<kotlin.Int>
CLASS INTERFACE name:CPointed modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CPointed
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:reinterpret visibility:public modality:FINAL <T> ($receiver:<root>.CPointed) returnType:T of <root>.reinterpret [inline]
TYPE_PARAMETER name:T index:0 variance: superTypes:[<root>.CPointed] reified:true
$receiver: VALUE_PARAMETER name:<this> type:<root>.CPointed
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun reinterpret <T> (): T of <root>.reinterpret declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null
CLASS CLASS name:CInt32VarX modality:FINAL visibility:public superTypes:[<root>.CPointed]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.CInt32VarX<T of <root>.CInt32VarX>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> () returnType:<root>.CInt32VarX<T of <root>.CInt32VarX> [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:CInt32VarX modality:FINAL visibility:public superTypes:[<root>.CPointed]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.CPointed
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.CPointed
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.CPointed
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
PROPERTY name:value visibility:public modality:FINAL [var]
FUN name:<get-value> visibility:public modality:FINAL <T_INT> ($receiver:<root>.CInt32VarX<T_INT of <root>.<get-value>>) returnType:T_INT of <root>.<get-value>
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CInt32VarX<T_INT of <root>.<get-value>>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> <T_INT> (): T_INT of <root>.<get-value> declared in <root>'
CALL 'public final fun TODO (): kotlin.Nothing declared in kotlin' type=kotlin.Nothing origin=null
FUN name:<set-value> visibility:public modality:FINAL <T_INT> ($receiver:<root>.CInt32VarX<T_INT of <root>.<set-value>>, value:T_INT of <root>.<set-value>) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [var]
TYPE_PARAMETER name:T_INT index:0 variance: superTypes:[kotlin.Int] reified:false
$receiver: VALUE_PARAMETER name:<this> type:<root>.CInt32VarX<T_INT of <root>.<set-value>>
VALUE_PARAMETER name:value index:0 type:T_INT of <root>.<set-value>
BLOCK_BODY
CLASS CLASS name:IdType modality:FINAL visibility:public superTypes:[<root>.CPointed]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IdType
CONSTRUCTOR visibility:public <> (value:kotlin.Int) returnType:<root>.IdType [primary]
VALUE_PARAMETER name:value index:0 type:kotlin.Int
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:IdType modality:FINAL visibility:public superTypes:[<root>.CPointed]'
PROPERTY name:value visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'value: kotlin.Int declared in <root>.IdType.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.IdType) returnType:kotlin.Int
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.IdType
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-value> (): kotlin.Int declared in <root>.IdType'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.IdType declared in <root>.IdType.<get-value>' type=<root>.IdType origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.CPointed
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.CPointed
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.CPointed
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:FINAL <> (value:<root>.IdType, cv:<root>.CInt32VarX<kotlin.Int>) returnType:kotlin.Unit
VALUE_PARAMETER name:value index:0 type:<root>.IdType
VALUE_PARAMETER name:cv index:1 type:<root>.CInt32VarX<kotlin.Int>
BLOCK_BODY
CALL 'public final fun <set-value> <T_INT> (value: T_INT of <root>.<set-value>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<T_INT>: kotlin.Int
$receiver: GET_VAR 'cv: <root>.CInt32VarX<kotlin.Int> declared in <root>.foo' type=<root>.CInt32VarX<kotlin.Int> origin=null
value: CALL 'public final fun <get-value> (): kotlin.Int declared in <root>.IdType' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'value: <root>.IdType declared in <root>.foo' type=<root>.IdType origin=null
@@ -1,41 +0,0 @@
typealias CInt32Var = CInt32VarX<Int>
interface CPointed {
}
inline fun <reified T : CPointed> CPointed.reinterpret(): T {
return TODO()
}
class CInt32VarX<T : Any?> : CPointed {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
var <T_INT : Int> CInt32VarX<T_INT>.value: T_INT
get(): T_INT {
return TODO()
}
set(value: T_INT) {
}
class IdType : CPointed {
constructor(value: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val value: Int
field = value
get
}
fun foo(value: IdType, cv: CInt32VarX<Int>) {
cv.<set-value><Int>(value = value.<get-value>())
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
interface CPointed
inline fun <reified T : CPointed> CPointed.reinterpret(): T = TODO()
@@ -1,47 +0,0 @@
FILE fqName:<root> fileName:/typeAliasCtorForGenericClass.kt
TYPEALIAS name:B visibility:public expandedType:<root>.A<X of <root>.B>
TYPE_PARAMETER name:X index:0 variance: superTypes:[kotlin.Any?] reified:false
TYPEALIAS name:B2 visibility:public expandedType:<root>.A<<root>.A<T of <root>.B2>>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<Q of <root>.A>
TYPE_PARAMETER name:Q index:0 variance: superTypes:[kotlin.Any?] reified:false
CONSTRUCTOR visibility:public <> (q:Q of <root>.A) returnType:<root>.A<Q of <root>.A> [primary]
VALUE_PARAMETER name:q index:0 type:Q of <root>.A
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:q visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:q type:Q of <root>.A visibility:private [final]
EXPRESSION_BODY
GET_VAR 'q: Q of <root>.A declared in <root>.A.<init>' type=Q of <root>.A origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-q> visibility:public modality:FINAL <> ($this:<root>.A<Q of <root>.A>) returnType:Q of <root>.A
correspondingProperty: PROPERTY name:q visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A<Q of <root>.A>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-q> (): Q of <root>.A declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:q type:Q of <root>.A visibility:private [final]' type=Q of <root>.A origin=null
receiver: GET_VAR '<this>: <root>.A<Q of <root>.A> declared in <root>.A.<get-q>' type=<root>.A<Q of <root>.A> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:bar visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:b type:<root>.A<kotlin.Int> [val]
CONSTRUCTOR_CALL 'public constructor <init> (q: Q of <root>.A) declared in <root>.A' type=<root>.A<kotlin.Int> origin=null
<class: Q>: kotlin.Int
q: CONST Int type=kotlin.Int value=2
VAR name:b2 type:<root>.A<<root>.A<kotlin.Int>> [val]
CONSTRUCTOR_CALL 'public constructor <init> (q: Q of <root>.A) declared in <root>.A' type=<root>.A<<root>.A<kotlin.Int>> origin=null
<class: Q>: <root>.A<kotlin.Int>
q: GET_VAR 'val b: <root>.A<kotlin.Int> declared in <root>.bar' type=<root>.A<kotlin.Int> origin=null
@@ -1,19 +0,0 @@
typealias B<X : Any?> = A<X>
typealias B2<T : Any?> = A<A<T>>
class A<Q : Any?> {
constructor(q: Q) /* primary */ {
super/*Any*/()
/* <init>() */
}
val q: Q
field = q
get
}
fun bar() {
val b: A<Int> = A<Int>(q = 2)
val b2: A<A<Int>> = A<A<Int>>(q = b)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A<Q>(val q: Q)
typealias B<X> = A<X>
@@ -39,3 +39,4 @@ open enum class Z : Enum<Z> {
get(): EnumEntries<Z> /* Synthetic body for ENUM_ENTRIES */
}
@@ -1,132 +0,0 @@
FILE fqName:<root> fileName:/javaWildcardType.kt
CLASS INTERFACE name:K modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K
FUN name:kf1 visibility:public modality:ABSTRACT <> ($this:<root>.K) returnType:kotlin.collections.Collection<out kotlin.CharSequence>
$this: VALUE_PARAMETER name:<this> type:<root>.K
FUN name:kf2 visibility:public modality:ABSTRACT <> ($this:<root>.K) returnType:kotlin.collections.Collection<kotlin.CharSequence>
$this: VALUE_PARAMETER name:<this> type:<root>.K
FUN name:kg1 visibility:public modality:ABSTRACT <> ($this:<root>.K, c:kotlin.collections.Collection<out kotlin.CharSequence>) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.K
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<out kotlin.CharSequence>
FUN name:kg2 visibility:public modality:ABSTRACT <> ($this:<root>.K, c:kotlin.collections.Collection<kotlin.CharSequence>) returnType:kotlin.Unit
$this: VALUE_PARAMETER name:<this> type:<root>.K
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<kotlin.CharSequence>
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.J; <root>.K]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
CONSTRUCTOR visibility:public <> (j:<root>.J, k:<root>.K) returnType:<root>.C [primary]
VALUE_PARAMETER name:j index:0 type:<root>.J
VALUE_PARAMETER name:k index:1 type:<root>.K
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.J; <root>.K]'
FUN DELEGATED_MEMBER name:jf1 visibility:public modality:OPEN <> ($this:<root>.C) returnType:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>?
overridden:
public abstract fun jf1 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun jf1 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.C'
CALL 'public abstract fun jf1 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>? origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jf1' type=<root>.C origin=null
FUN DELEGATED_MEMBER name:jf2 visibility:public modality:OPEN <> ($this:<root>.C) returnType:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>?
overridden:
public abstract fun jf2 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun jf2 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.C'
CALL 'public abstract fun jf2 (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.J' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>? origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jf2' type=<root>.C origin=null
FUN DELEGATED_MEMBER name:jg1 visibility:public modality:OPEN <> ($this:<root>.C, c:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>?) returnType:kotlin.Unit
overridden:
public abstract fun jg1 (c: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:c index:0 type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>?
BLOCK_BODY
CALL 'public abstract fun jg1 (c: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jg1' type=<root>.C origin=null
c: GET_VAR 'c: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.C.jg1' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<out @[FlexibleNullability] kotlin.CharSequence?>? origin=null
FUN DELEGATED_MEMBER name:jg2 visibility:public modality:OPEN <> ($this:<root>.C, c:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>?) returnType:kotlin.Unit
overridden:
public abstract fun jg2 (c: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:c index:0 type:@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>?
BLOCK_BODY
CALL 'public abstract fun jg2 (c: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>?): kotlin.Unit declared in <root>.J' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]' type=<root>.J origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.jg2' type=<root>.C origin=null
c: GET_VAR 'c: @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>? declared in <root>.C.jg2' type=@[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] kotlin.CharSequence?>? origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.J visibility:private [final]
EXPRESSION_BODY
GET_VAR 'j: <root>.J declared in <root>.C.<init>' type=<root>.J origin=null
FUN DELEGATED_MEMBER name:kf1 visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.collections.Collection<out kotlin.CharSequence>
overridden:
public abstract fun kf1 (): kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun kf1 (): kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.C'
CALL 'public abstract fun kf1 (): kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.K' type=kotlin.collections.Collection<out kotlin.CharSequence> origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:<root>.K visibility:private [final]' type=<root>.K origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kf1' type=<root>.C origin=null
FUN DELEGATED_MEMBER name:kf2 visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.collections.Collection<kotlin.CharSequence>
overridden:
public abstract fun kf2 (): kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:<root>.C
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun kf2 (): kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.C'
CALL 'public abstract fun kf2 (): kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.K' type=kotlin.collections.Collection<kotlin.CharSequence> origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:<root>.K visibility:private [final]' type=<root>.K origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kf2' type=<root>.C origin=null
FUN DELEGATED_MEMBER name:kg1 visibility:public modality:OPEN <> ($this:<root>.C, c:kotlin.collections.Collection<out kotlin.CharSequence>) returnType:kotlin.Unit
overridden:
public abstract fun kg1 (c: kotlin.collections.Collection<out kotlin.CharSequence>): kotlin.Unit declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<out kotlin.CharSequence>
BLOCK_BODY
CALL 'public abstract fun kg1 (c: kotlin.collections.Collection<out kotlin.CharSequence>): kotlin.Unit declared in <root>.K' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:<root>.K visibility:private [final]' type=<root>.K origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kg1' type=<root>.C origin=null
c: GET_VAR 'c: kotlin.collections.Collection<out kotlin.CharSequence> declared in <root>.C.kg1' type=kotlin.collections.Collection<out kotlin.CharSequence> origin=null
FUN DELEGATED_MEMBER name:kg2 visibility:public modality:OPEN <> ($this:<root>.C, c:kotlin.collections.Collection<kotlin.CharSequence>) returnType:kotlin.Unit
overridden:
public abstract fun kg2 (c: kotlin.collections.Collection<kotlin.CharSequence>): kotlin.Unit declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:c index:0 type:kotlin.collections.Collection<kotlin.CharSequence>
BLOCK_BODY
CALL 'public abstract fun kg2 (c: kotlin.collections.Collection<kotlin.CharSequence>): kotlin.Unit declared in <root>.K' type=kotlin.Unit origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_1 type:<root>.K visibility:private [final]' type=<root>.K origin=null
receiver: GET_VAR '<this>: <root>.C declared in <root>.C.kg2' type=<root>.C origin=null
c: GET_VAR 'c: kotlin.collections.Collection<kotlin.CharSequence> declared in <root>.C.kg2' type=kotlin.collections.Collection<kotlin.CharSequence> origin=null
FIELD DELEGATE name:$$delegate_1 type:<root>.K visibility:private [final]
EXPRESSION_BODY
GET_VAR 'k: <root>.K declared in <root>.C.<init>' type=<root>.K origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.J
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.J
public open fun hashCode (): kotlin.Int declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.J
public open fun toString (): kotlin.String declared in <root>.K
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -1,55 +0,0 @@
interface K {
abstract fun kf1(): Collection<out CharSequence>
abstract fun kf2(): Collection<CharSequence>
abstract fun kg1(c: Collection<out CharSequence>)
abstract fun kg2(c: Collection<CharSequence>)
}
class C : J, K {
constructor(j: J, k: K) /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun jf1(): @FlexibleNullability @FlexibleMutability MutableCollection<out @FlexibleNullability CharSequence?>? {
return <this>.#$$delegate_0.jf1()
}
override fun jf2(): @FlexibleNullability @FlexibleMutability MutableCollection<@FlexibleNullability CharSequence?>? {
return <this>.#$$delegate_0.jf2()
}
override fun jg1(c: @FlexibleNullability @FlexibleMutability MutableCollection<out @FlexibleNullability CharSequence?>?) {
<this>.#$$delegate_0.jg1(c = c)
}
override fun jg2(c: @FlexibleNullability @FlexibleMutability MutableCollection<@FlexibleNullability CharSequence?>?) {
<this>.#$$delegate_0.jg2(c = c)
}
private /* final field */ val $$delegate_0: J = j
override fun kf1(): Collection<out CharSequence> {
return <this>.#$$delegate_1.kf1()
}
override fun kf2(): Collection<CharSequence> {
return <this>.#$$delegate_1.kf2()
}
override fun kg1(c: Collection<out CharSequence>) {
<this>.#$$delegate_1.kg1(c = c)
}
override fun kg2(c: Collection<CharSequence>) {
<this>.#$$delegate_1.kg2(c = c)
}
private /* final field */ val $$delegate_1: K = k
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// TARGET_BACKEND: JVM
// FILE: javaWildcardType.kt
@@ -1,88 +0,0 @@
Module: lib
Module: main
FILE fqName:<root> fileName:/nullCheckOnInterfaceDelegation.kt
CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.IFoo
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.IFoo) returnType:kotlin.String
$this: VALUE_PARAMETER name:<this> type:<root>.IFoo
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Derived modality:FINAL visibility:public superTypes:[<root>.A; <root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Derived
CONSTRUCTOR visibility:public <> () returnType:<root>.Derived [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.A'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Derived modality:FINAL visibility:public superTypes:[<root>.A; <root>.IFoo]'
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.Derived) returnType:@[FlexibleNullability] kotlin.String?
overridden:
public open fun foo (): @[FlexibleNullability] kotlin.String? declared in <root>.A
public abstract fun foo (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.Derived
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun foo (): @[FlexibleNullability] kotlin.String? declared in <root>.Derived'
CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in <root>.A' superQualifier='CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:A modality:OPEN visibility:public superTypes:[kotlin.Any]' type=@[FlexibleNullability] kotlin.String? origin=null
$this: GET_VAR '<this>: <root>.Derived declared in <root>.Derived.foo' type=<root>.Derived origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.A
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.A
public open fun hashCode (): kotlin.Int declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.A
public open fun toString (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:Delegated modality:FINAL visibility:public superTypes:[<root>.IFoo]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Delegated
CONSTRUCTOR visibility:public <> () returnType:<root>.Delegated [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Delegated modality:FINAL visibility:public superTypes:[<root>.IFoo]'
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:<root>.Delegated) returnType:kotlin.String
overridden:
public abstract fun foo (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:<root>.Delegated
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in <root>.Delegated'
TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String
CALL 'public open fun foo (): @[FlexibleNullability] kotlin.String? declared in <root>.Derived' type=@[FlexibleNullability] kotlin.String? origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.Derived visibility:private [final]' type=<root>.Derived origin=null
receiver: GET_VAR '<this>: <root>.Delegated declared in <root>.Delegated.foo' type=<root>.Delegated origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.Derived visibility:private [final]
EXPRESSION_BODY
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Derived' type=<root>.Derived origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:testReturnValue visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testReturnValue (): kotlin.String declared in <root>'
CALL 'public open fun foo (): kotlin.String declared in <root>.Delegated' type=kotlin.String origin=null
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Delegated' type=<root>.Delegated origin=null
@@ -1,41 +0,0 @@
// MODULE: lib
// MODULE: main
// FILE: nullCheckOnInterfaceDelegation.kt
interface IFoo {
abstract fun foo(): String
}
class Derived : A, IFoo {
constructor() /* primary */ {
super/*A*/()
/* <init>() */
}
override fun foo(): @FlexibleNullability String? {
return super<A>.foo()
}
}
class Delegated : IFoo {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun foo(): String {
return <this>.#$$delegate_0.foo() /*!! String */
}
private /* final field */ val $$delegate_0: Derived = Derived()
}
fun testReturnValue(): String {
return Delegated().foo()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// TARGET_BACKEND: JVM
// MODULE: lib
@@ -84,6 +84,9 @@ FILE fqName:<root> fileName:/rawTypeInSignature.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:KRaw modality:FINAL visibility:public superTypes:[<root>.JRaw]'
FIELD DELEGATE name:$$delegate_0 type:<root>.JRaw visibility:private [final]
EXPRESSION_BODY
GET_VAR 'j: <root>.JRaw declared in <root>.KRaw.<init>' type=<root>.JRaw origin=null
FUN DELEGATED_MEMBER name:takesRawList visibility:public modality:OPEN <> ($this:<root>.KRaw, list:@[FlexibleNullability] @[FlexibleMutability] @[RawType] kotlin.collections.MutableList<kotlin.Any?>) returnType:kotlin.Unit
overridden:
public abstract fun takesRawList (list: @[FlexibleNullability] @[FlexibleMutability] @[RawType] kotlin.collections.MutableList<kotlin.Any?>): kotlin.Unit declared in <root>.JRaw
@@ -164,9 +167,6 @@ FILE fqName:<root> fileName:/rawTypeInSignature.kt
CALL 'public abstract fun returnsRawGenericOut (): @[FlexibleNullability] @[RawType] <root>.GenericOut<kotlin.Number> declared in <root>.JRaw' type=@[FlexibleNullability] @[RawType] <root>.GenericOut<kotlin.Number> origin=null
$this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:<root>.JRaw visibility:private [final]' type=<root>.JRaw origin=null
receiver: GET_VAR '<this>: <root>.KRaw declared in <root>.KRaw.returnsRawGenericOut' type=<root>.KRaw origin=null
FIELD DELEGATE name:$$delegate_0 type:<root>.JRaw visibility:private [final]
EXPRESSION_BODY
GET_VAR 'j: <root>.JRaw declared in <root>.KRaw.<init>' type=<root>.JRaw origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.JRaw
@@ -44,6 +44,7 @@ class KRaw : JRaw {
}
private /* final field */ val $$delegate_0: JRaw = j
override fun takesRawList(list: @FlexibleNullability @FlexibleMutability @RawType MutableList<Any?>) {
<this>.#$$delegate_0.takesRawList(list = list)
}
@@ -76,7 +77,5 @@ class KRaw : JRaw {
return <this>.#$$delegate_0.returnsRawGenericOut() /*!! @RawType GenericOut<Number> */
}
private /* final field */ val $$delegate_0: JRaw = j
}
@@ -1,11 +1,11 @@
MODULE_FRAGMENT name:<typealias.kt>
FILE fqName:test fileName:typealias.kt
TYPEALIAS name:PublicTypeAlias visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias visibility:private expandedType:test.ClassName
CLASS CLASS name:ClassName modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.ClassName
CONSTRUCTOR visibility:public <> () returnType:test.ClassName [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ClassName modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
TYPEALIAS name:PublicTypeAlias visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias visibility:private expandedType:test.ClassName
@@ -1,11 +1,11 @@
MODULE_FRAGMENT name:<typealias.kt>
FILE fqName:test fileName:typealias.kt
TYPEALIAS name:PublicTypeAlias signature:test/PublicTypeAlias|null[0] visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias signature:test/InternalTypeAlias|null[0] visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias signature:[ File 'typealias.kt' <- test/PrivateTypeAlias|null[0] ] visibility:private expandedType:test.ClassName
CLASS CLASS name:ClassName signature:test/ClassName|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.ClassName
CONSTRUCTOR signature:test/ClassName.<init>|<init>(){}[0] visibility:public <> () returnType:test.ClassName [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ClassName signature:test/ClassName|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
TYPEALIAS name:PublicTypeAlias signature:test/PublicTypeAlias|null[0] visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias signature:test/InternalTypeAlias|null[0] visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias signature:[ File 'typealias.kt' <- test/PrivateTypeAlias|null[0] ] visibility:private expandedType:test.ClassName