From 961037506ac08c9a1511ee2125071f36f88228b6 Mon Sep 17 00:00:00 2001 From: "simon.ogorodnik" Date: Mon, 30 Dec 2019 13:49:50 +0300 Subject: [PATCH] FIR2IR: support FirEnumEntry --- .../kotlin/fir/backend/ConversionUtils.kt | 2 +- .../fir/backend/Fir2IrDeclarationStorage.kt | 71 +- .../kotlin/fir/backend/Fir2IrVisitor.kt | 27 +- .../testData/ir/irText/classes/enum.fir.txt | 675 +++--------------- .../irText/classes/enumClassModality.fir.txt | 244 ++----- .../classes/enumWithSecondaryCtor.fir.txt | 224 ++---- .../enumEntriesWithAnnotations.fir.txt | 80 +-- .../enumsInAnnotationArguments.fir.txt | 104 +-- .../annotations/fileAnnotations.fir.txt | 2 +- .../typeAliasesWithAnnotations.fir.txt | 2 +- .../typeParametersWithAnnotations.fir.txt | 2 +- .../multiplatform/expectedEnumClass.fir.txt | 130 +--- .../expressions/enumEntryAsReceiver.fir.txt | 80 +-- .../expressions/objectAsCallable.fir.txt | 39 +- .../temporaryInEnumEntryInitializer.fir.txt | 66 +- .../ir/irText/expressions/values.fir.txt | 28 +- .../ir/irText/singletons/enumEntry.fir.txt | 121 +--- 17 files changed, 509 insertions(+), 1388 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index 495b788ace4..354136c5124 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -186,6 +186,6 @@ fun FirVariableSymbol<*>.toBackingFieldSymbol(declarationStorage: Fir2IrDeclarat return declarationStorage.getIrBackingFieldSymbol(this) } -fun FirVariableSymbol<*>.toValueSymbol(declarationStorage: Fir2IrDeclarationStorage): IrValueSymbol { +fun FirVariableSymbol<*>.toValueSymbol(declarationStorage: Fir2IrDeclarationStorage): IrSymbol { return declarationStorage.getIrValueSymbol(this) } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index ee2d66c3290..2134d9bf821 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -28,10 +28,12 @@ import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.declarations.impl.* import org.jetbrains.kotlin.ir.descriptors.* import org.jetbrains.kotlin.ir.expressions.IrExpression +import org.jetbrains.kotlin.ir.expressions.impl.IrEnumConstructorCallImpl import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl import org.jetbrains.kotlin.ir.util.SymbolTable +import org.jetbrains.kotlin.ir.util.constructors import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.psi.KtFunctionLiteral @@ -64,6 +66,8 @@ class Fir2IrDeclarationStorage( private val fieldCache = mutableMapOf() + private val enumEntryCache = mutableMapOf() + private val localStorage = Fir2IrLocalStorage() private val unitType = session.builtinTypes.unitType.toIrType(session, this) @@ -212,7 +216,29 @@ class Fir2IrDeclarationStorage( }.declareSupertypesAndTypeParameters(anonymousObject) } - fun getIrTypeParameter(typeParameter: FirTypeParameter, index: Int = 0): IrTypeParameter { + private fun getIrEnumEntryClass(enumEntry: FirEnumEntry, anonymousObject: FirAnonymousObject, irParent: IrClass?): IrClass { + val descriptor = WrappedClassDescriptor() + val origin = IrDeclarationOrigin.DEFINED + val modality = Modality.FINAL + return anonymousObject.convertWithOffsets { startOffset, endOffset -> + irSymbolTable.declareClass(startOffset, endOffset, origin, descriptor, modality) { symbol -> + IrClassImpl( + startOffset, endOffset, origin, symbol, + enumEntry.name, anonymousObject.classKind, + Visibilities.LOCAL, modality, + isCompanion = false, isInner = false, isData = false, isExternal = false, isInline = false, isExpect = false + ).apply { + descriptor.bind(this) + declareThisReceiver() + if (irParent != null) { + this.parent = irParent + } + } + } + }.declareSupertypesAndTypeParameters(anonymousObject) + } + + private fun getIrTypeParameter(typeParameter: FirTypeParameter, index: Int = 0): IrTypeParameter { return typeParameterCache[typeParameter] ?: typeParameter.run { val descriptor = WrappedTypeParameterDescriptor() val origin = IrDeclarationOrigin.DEFINED @@ -512,6 +538,43 @@ class Fir2IrDeclarationStorage( } } + + fun getIrEnumEntry( + enumEntry: FirEnumEntry, + irParent: IrClass? = null, + origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED + ): IrEnumEntry { + return enumEntryCache.getOrPut(enumEntry) { + enumEntry.convertWithOffsets { startOffset, endOffset -> + val desc = WrappedEnumEntryDescriptor() + enterScope(desc) + val result = irSymbolTable.declareEnumEntry(startOffset, endOffset, origin, desc) { symbol -> + IrEnumEntryImpl( + startOffset, endOffset, origin, symbol, enumEntry.name + ).apply { + desc.bind(this) + val irType = enumEntry.returnTypeRef.toIrType(session, this@Fir2IrDeclarationStorage) + if (irParent != null) { + this.parent = irParent + } + val initializer = enumEntry.initializer + if (initializer != null) { + initializer as FirAnonymousObject + val klass = getIrEnumEntryClass(enumEntry, initializer, irParent) + + this.correspondingClass = klass + } else if (irParent != null) { + this.initializerExpression = + IrEnumConstructorCallImpl(startOffset, endOffset, irType, irParent.constructors.first().symbol) + } + } + } + leaveScope(desc) + result + } + } + } + fun getIrProperty( property: FirProperty, irParent: IrDeclarationParent? = null, @@ -738,8 +801,12 @@ class Fir2IrDeclarationStorage( return irSymbolTable.referenceVariable(irDeclaration.descriptor) } - fun getIrValueSymbol(firVariableSymbol: FirVariableSymbol<*>): IrValueSymbol { + fun getIrValueSymbol(firVariableSymbol: FirVariableSymbol<*>): IrSymbol { return when (val firDeclaration = firVariableSymbol.fir) { + is FirEnumEntry -> { + val irEnumEntry = getIrEnumEntry(firDeclaration) + irSymbolTable.referenceEnumEntry(irEnumEntry.descriptor) + } is FirValueParameter -> { val irDeclaration = localStorage.getParameter(firDeclaration) // catch parameter is FirValueParameter in FIR but IrVariable in IR diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index 50ac68fe3a9..2a1595e6096 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -45,7 +45,6 @@ import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.types.* -import org.jetbrains.kotlin.ir.types.impl.IrErrorTypeImpl import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.name.ClassId @@ -54,7 +53,6 @@ import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi2ir.PsiSourceManager import org.jetbrains.kotlin.types.AbstractStrictEqualityTypeChecker -import org.jetbrains.kotlin.types.Variance import java.util.* class Fir2IrVisitor( @@ -168,6 +166,15 @@ class Fir2IrVisitor( return accept(this@Fir2IrVisitor, null) as IrDeclaration } + override fun visitEnumEntry(enumEntry: FirEnumEntry, data: Any?): IrElement { + val irEnumEntry = declarationStorage.getIrEnumEntry(enumEntry, irParent = parentStack.last() as IrClass) + irEnumEntry.correspondingClass?.withParent { + setClassContent(enumEntry.initializer as FirAnonymousObject) + } + //irEnumEntry.initializerExpression = IrEnumConstructorCallImpl() + return irEnumEntry.setParentByParentStack() + } + private fun FirTypeRef.collectCallableNamesFromThisAndSupertypes(result: MutableList = mutableListOf()): List { if (this is FirResolvedTypeRef) { val superType = type @@ -486,7 +493,7 @@ class Fir2IrVisitor( } } - private fun visitLocalVariable(variable: FirProperty, data: Any?): IrElement { + private fun visitLocalVariable(variable: FirProperty): IrElement { assert(variable.isLocal) val irVariable = declarationStorage.createAndSaveIrVariable(variable) return irVariable.setParentByParentStack().apply { @@ -584,7 +591,7 @@ class Fir2IrVisitor( } override fun visitProperty(property: FirProperty, data: Any?): IrElement { - if (property.isLocal) return visitLocalVariable(property, data) + if (property.isLocal) return visitLocalVariable(property) val irProperty = declarationStorage.getIrProperty(property, irParent = parentStack.last() as? IrClass) return irProperty.setParentByParentStack().withProperty { setPropertyContent(irProperty.descriptor, property) } } @@ -706,6 +713,7 @@ class Fir2IrVisitor( startOffset, endOffset, type, symbol, origin = calleeReference.statementOrigin() ) + symbol is IrEnumEntrySymbol -> IrGetEnumValueImpl(startOffset, endOffset, type, symbol) else -> generateErrorCallExpression(startOffset, endOffset, calleeReference, type) } } @@ -733,7 +741,9 @@ class Fir2IrVisitor( } } - else -> IrErrorCallExpressionImpl(startOffset, endOffset, type ?: createErrorType(), "Unresolved reference: ${render()}") + else -> { + IrErrorCallExpressionImpl(startOffset, endOffset, type ?: createErrorType(), "Unresolved reference: ${render()}") + } } } } @@ -849,13 +859,13 @@ class Fir2IrVisitor( } override fun visitFunctionCall(functionCall: FirFunctionCall, data: Any?): IrElement { - val functionCall = if (functionCall.toResolvedCallableSymbol()?.fir is FirIntegerOperator) { + val convertibleCall = if (functionCall.toResolvedCallableSymbol()?.fir is FirIntegerOperator) { functionCall.copy().transformSingle(integerApproximator, null) } else { functionCall } - return functionCall.toIrExpression(functionCall.typeRef).applyCallArguments(functionCall).applyTypeArguments(functionCall) - .applyReceivers(functionCall) + return convertibleCall.toIrExpression(convertibleCall.typeRef) + .applyCallArguments(convertibleCall).applyTypeArguments(convertibleCall).applyReceivers(convertibleCall) } override fun visitAnnotationCall(annotationCall: FirAnnotationCall, data: Any?): IrElement { @@ -955,6 +965,7 @@ class Fir2IrVisitor( return constExpression.convertWithOffsets { startOffset, endOffset -> @Suppress("UNCHECKED_CAST") val kind = constExpression.getIrConstKind() as IrConstKind + @Suppress("UNCHECKED_CAST") val value = (constExpression.value as? Long)?.let { when (kind) { diff --git a/compiler/testData/ir/irText/classes/enum.fir.txt b/compiler/testData/ir/irText/classes/enum.fir.txt index 9294cdd20e2..604a39cc6c8 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.txt @@ -5,44 +5,20 @@ FILE fqName: fileName:/enum.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestEnum1>]' - CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum1.TEST1 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum1.TEST1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum1.TEST2 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum1.TEST2 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:TEST1 + class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum1.TEST1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum1]' + ENUM_ENTRY name:TEST2 + class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum1.TEST2 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum1]' FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum1) returnType:kotlin.Array<.TestEnum1> $this: VALUE_PARAMETER name: type:.TestEnum1 BLOCK_BODY @@ -102,174 +78,30 @@ FILE fqName: fileName:/enum.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum2' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .TestEnum2 declared in .TestEnum2.' type=.TestEnum2 origin=null - CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[.TestEnum2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2.TEST1 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum2.TEST1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum2' - x: CONST Int type=kotlin.Int value=1 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[.TestEnum2]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST1) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST1 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum2) returnType:kotlin.Array<.TestEnum2> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum2> declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum2, value:kotlin.String) returnType:.TestEnum2 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum2 declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum2) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum2 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST1) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST1 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST1) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST1 - CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2.TEST2 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum2.TEST2 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum2' - x: CONST Int type=kotlin.Int value=2 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum2]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST2) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST2 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum2) returnType:kotlin.Array<.TestEnum2> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum2> declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum2, value:kotlin.String) returnType:.TestEnum2 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum2 declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum2) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum2 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST2) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST2 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST2) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST2 - CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:public superTypes:[.TestEnum2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2.TEST3 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum2.TEST3 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum2' - x: CONST Int type=kotlin.Int value=3 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:public superTypes:[.TestEnum2]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST3) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST3 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum2) returnType:kotlin.Array<.TestEnum2> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum2> declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum2, value:kotlin.String) returnType:.TestEnum2 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum2 declared in .TestEnum2 - $this: VALUE_PARAMETER name: type:.TestEnum2 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum2) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum2 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST3) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST3 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum2.TEST3) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum2.TEST3 + ENUM_ENTRY name:TEST1 + class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2.TEST1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum2' + x: CONST Int type=kotlin.Int value=1 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum2]' + ENUM_ENTRY name:TEST2 + class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2.TEST2 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum2' + x: CONST Int type=kotlin.Int value=2 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum2]' + ENUM_ENTRY name:TEST3 + class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[.TestEnum2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2.TEST3 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum2' + x: CONST Int type=kotlin.Int value=3 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[.TestEnum2]' FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum2) returnType:kotlin.Array<.TestEnum2> $this: VALUE_PARAMETER name: type:.TestEnum2 BLOCK_BODY @@ -317,30 +149,18 @@ FILE fqName: fileName:/enum.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestEnum3>]' - CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum3.TEST - CONSTRUCTOR visibility:public <> () returnType:.TestEnum3.TEST [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum3.TEST) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.TestEnum3.TEST - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="Hello, world!" - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:TEST + class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[.TestEnum3] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum3.TEST + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum3' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[.TestEnum3]' + FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum3.TEST) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.TestEnum3.TEST + BLOCK_BODY + CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null + message: CONST String type=kotlin.String value="Hello, world!" FUN name:foo visibility:public modality:ABSTRACT <> ($this:.TestEnum3) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum3 FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum3) returnType:kotlin.Array<.TestEnum3> @@ -402,143 +222,46 @@ FILE fqName: fileName:/enum.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum4' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .TestEnum4 declared in .TestEnum4.' type=.TestEnum4 origin=null - CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[.TestEnum4] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum4.TEST1 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum4.TEST1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum4' - x: CONST Int type=kotlin.Int value=1 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[.TestEnum4]' - FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST1) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST1 - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: GET_OBJECT 'CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[.TestEnum4]' type=.TestEnum4 - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST1) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum4 + ENUM_ENTRY name:TEST1 + class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum4] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum4.TEST1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum4' + x: CONST Int type=kotlin.Int value=1 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum4]' + FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST1) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum4.TEST1 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum4) returnType:kotlin.Array<.TestEnum4> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum4> declared in .TestEnum4 - $this: VALUE_PARAMETER name: type:.TestEnum4 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum4, value:kotlin.String) returnType:.TestEnum4 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum4 declared in .TestEnum4 - $this: VALUE_PARAMETER name: type:.TestEnum4 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum4) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum4 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST1) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST1 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST1) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST1 - CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum4] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum4.TEST2 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum4.TEST2 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum4' - x: CONST Int type=kotlin.Int value=2 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum4]' - PROPERTY name:z visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final] - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Int - correspondingProperty: PROPERTY name:z visibility:public modality:FINAL [val] + BLOCK_BODY + CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null + message: GET_ENUM 'ENUM_ENTRY name:TEST1' type=.TestEnum4 + ENUM_ENTRY name:TEST2 + class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum4] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum4.TEST2 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum4' + x: CONST Int type=kotlin.Int value=2 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum4]' + PROPERTY name:z visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final] + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Int + correspondingProperty: PROPERTY name:z visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum4.TEST2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2.' type=.TestEnum4.TEST2 origin=null + ANONYMOUS_INITIALIZER isStatic=false + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null + receiver: GET_VAR ': . declared in .' type=. origin=null + value: GET_VAR 'x: kotlin.Int declared in .TestEnum4.' type=kotlin.Int origin=null + FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum4.TEST2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2.' type=.TestEnum4.TEST2 origin=null - ANONYMOUS_INITIALIZER isStatic=false - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2' type=.TestEnum4.TEST2 origin=null - value: CALL 'public final fun (): kotlin.Int declared in .TestEnum4' type=kotlin.Int origin=null - $this: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2' type=.TestEnum4.TEST2 origin=null - FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: GET_OBJECT 'CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum4]' type=.TestEnum4 - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum4 - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum4) returnType:kotlin.Array<.TestEnum4> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum4> declared in .TestEnum4 - $this: VALUE_PARAMETER name: type:.TestEnum4 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum4, value:kotlin.String) returnType:.TestEnum4 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum4 declared in .TestEnum4 - $this: VALUE_PARAMETER name: type:.TestEnum4 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum4) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum4 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 + CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null + message: GET_ENUM 'ENUM_ENTRY name:TEST2' type=.TestEnum4 FUN name:foo visibility:public modality:ABSTRACT <> ($this:.TestEnum4) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum4 FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum4) returnType:kotlin.Array<.TestEnum4> @@ -602,136 +325,28 @@ FILE fqName: fileName:/enum.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum5' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .TestEnum5 declared in .TestEnum5.' type=.TestEnum5 origin=null - CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5.TEST1 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum5.TEST1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum5] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5.TEST2 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum5.TEST2 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum5' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:public superTypes:[.TestEnum5]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum5.TEST2) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum5 - $this: VALUE_PARAMETER name: type:.TestEnum5.TEST2 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum5) returnType:kotlin.Array<.TestEnum5> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum5> declared in .TestEnum5 - $this: VALUE_PARAMETER name: type:.TestEnum5 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum5, value:kotlin.String) returnType:.TestEnum5 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum5 declared in .TestEnum5 - $this: VALUE_PARAMETER name: type:.TestEnum5 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum5) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum5 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum5.TEST2) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum5.TEST2 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum5.TEST2) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum5.TEST2 - CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:public superTypes:[.TestEnum5] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5.TEST3 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum5.TEST3 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum5' - x: CONST Int type=kotlin.Int value=0 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:public superTypes:[.TestEnum5]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum5.TEST3) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum5 - $this: VALUE_PARAMETER name: type:.TestEnum5.TEST3 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum5) returnType:kotlin.Array<.TestEnum5> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum5> declared in .TestEnum5 - $this: VALUE_PARAMETER name: type:.TestEnum5 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum5, value:kotlin.String) returnType:.TestEnum5 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum5 declared in .TestEnum5 - $this: VALUE_PARAMETER name: type:.TestEnum5 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum5) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum5 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum5.TEST3) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum5.TEST3 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum5.TEST3) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum5.TEST3 + ENUM_ENTRY name:TEST1 + class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum5] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5.TEST1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum5' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:local superTypes:[.TestEnum5]' + ENUM_ENTRY name:TEST2 + class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum5] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5.TEST2 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum5' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:local superTypes:[.TestEnum5]' + ENUM_ENTRY name:TEST3 + class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[.TestEnum5] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5.TEST3 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestEnum5' + x: CONST Int type=kotlin.Int value=0 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:local superTypes:[.TestEnum5]' FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum5) returnType:kotlin.Array<.TestEnum5> $this: VALUE_PARAMETER name: type:.TestEnum5 BLOCK_BODY @@ -807,69 +422,15 @@ FILE fqName: fileName:/enum.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum6' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .TestEnum6 declared in .TestEnum6.' type=.TestEnum6 origin=null - CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:public superTypes:[.TestEnum6] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum6.TEST - CONSTRUCTOR visibility:public <> () returnType:.TestEnum6.TEST [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int, y: kotlin.Int) [primary] declared in .TestEnum6' - x: CALL 'public final fun f (): kotlin.Int declared in ' type=kotlin.Int origin=null - y: CALL 'public final fun f (): kotlin.Int declared in ' type=kotlin.Int origin=null - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:public superTypes:[.TestEnum6]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum6.TEST) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum6 - $this: VALUE_PARAMETER name: type:.TestEnum6.TEST - PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum6.TEST) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestEnum6 - $this: VALUE_PARAMETER name: type:.TestEnum6.TEST - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestEnum6) returnType:kotlin.Array<.TestEnum6> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestEnum6> declared in .TestEnum6 - $this: VALUE_PARAMETER name: type:.TestEnum6 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestEnum6, value:kotlin.String) returnType:.TestEnum6 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestEnum6 declared in .TestEnum6 - $this: VALUE_PARAMETER name: type:.TestEnum6 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestEnum6) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestEnum6 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum6.TEST) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum6.TEST - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestEnum6.TEST) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestEnum6.TEST + ENUM_ENTRY name:TEST + class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[.TestEnum6] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum6.TEST + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int, y: kotlin.Int) [primary] declared in .TestEnum6' + x: CALL 'public final fun f (): kotlin.Int declared in ' type=kotlin.Int origin=null + y: CALL 'public final fun f (): kotlin.Int declared in ' type=kotlin.Int origin=null + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:local superTypes:[.TestEnum6]' FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum6) returnType:kotlin.Array<.TestEnum6> $this: VALUE_PARAMETER name: type:.TestEnum6 BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt index 4f0e2b71633..3841f58ec5d 100644 --- a/compiler/testData/ir/irText/classes/enumClassModality.fir.txt +++ b/compiler/testData/ir/irText/classes/enumClassModality.fir.txt @@ -5,25 +5,13 @@ FILE fqName: fileName:/enumClassModality.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestFinalEnum1>]' - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum1.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestFinalEnum1.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestFinalEnum1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum1.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestFinalEnum1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestFinalEnum1]' FUN name:values visibility:public modality:FINAL <> ($this:.TestFinalEnum1) returnType:kotlin.Array<.TestFinalEnum1> $this: VALUE_PARAMETER name: type:.TestFinalEnum1 BLOCK_BODY @@ -83,62 +71,14 @@ FILE fqName: fileName:/enumClassModality.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestFinalEnum2' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .TestFinalEnum2 declared in .TestFinalEnum2.' type=.TestFinalEnum2 origin=null - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[.TestFinalEnum2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum2.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestFinalEnum2.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestFinalEnum2' - x: CONST Int type=kotlin.Int value=1 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[.TestFinalEnum2]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestFinalEnum2.X1) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .TestFinalEnum2 - $this: VALUE_PARAMETER name: type:.TestFinalEnum2.X1 - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.TestFinalEnum2) returnType:kotlin.Array<.TestFinalEnum2> [fake_override] - overridden: - public final fun values (): kotlin.Array<.TestFinalEnum2> declared in .TestFinalEnum2 - $this: VALUE_PARAMETER name: type:.TestFinalEnum2 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.TestFinalEnum2, value:kotlin.String) returnType:.TestFinalEnum2 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .TestFinalEnum2 declared in .TestFinalEnum2 - $this: VALUE_PARAMETER name: type:.TestFinalEnum2 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.TestFinalEnum2) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.TestFinalEnum2 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestFinalEnum2.X1) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestFinalEnum2.X1 - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.TestFinalEnum2.X1) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.TestFinalEnum2.X1 + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestFinalEnum2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum2.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .TestFinalEnum2' + x: CONST Int type=kotlin.Int value=1 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestFinalEnum2]' FUN name:values visibility:public modality:FINAL <> ($this:.TestFinalEnum2) returnType:kotlin.Array<.TestFinalEnum2> $this: VALUE_PARAMETER name: type:.TestFinalEnum2 BLOCK_BODY @@ -186,25 +126,13 @@ FILE fqName: fileName:/enumClassModality.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestFinalEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestFinalEnum3>]' - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum3.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestFinalEnum3.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestFinalEnum3] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum3.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestFinalEnum3' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestFinalEnum3]' FUN name:doStuff visibility:public modality:FINAL <> ($this:.TestFinalEnum3) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestFinalEnum3 BLOCK_BODY @@ -255,26 +183,18 @@ FILE fqName: fileName:/enumClassModality.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestOpenEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestOpenEnum1>]' - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum1.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestOpenEnum1.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:toString visibility:public modality:FINAL <> ($this:.TestOpenEnum1.X1) returnType:kotlin.String - $this: VALUE_PARAMETER name: type:.TestOpenEnum1.X1 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun toString (): kotlin.String declared in .TestOpenEnum1.X1' - CONST String type=kotlin.String value="X1" - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: type:kotlin.Any + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestOpenEnum1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum1.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestOpenEnum1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestOpenEnum1]' + FUN name:toString visibility:public modality:FINAL <> ($this:.TestOpenEnum1.X1) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.TestOpenEnum1.X1 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun toString (): kotlin.String declared in .TestOpenEnum1.X1' + CONST String type=kotlin.String value="X1" FUN name:values visibility:public modality:FINAL <> ($this:.TestOpenEnum1) returnType:kotlin.Array<.TestOpenEnum1> $this: VALUE_PARAMETER name: type:.TestOpenEnum1 BLOCK_BODY @@ -322,28 +242,16 @@ FILE fqName: fileName:/enumClassModality.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestOpenEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestOpenEnum2>]' - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum2.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestOpenEnum2.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.TestOpenEnum2.X1) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.TestOpenEnum2.X1 - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestOpenEnum2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum2.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestOpenEnum2' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestOpenEnum2]' + FUN name:foo visibility:public modality:FINAL <> ($this:.TestOpenEnum2.X1) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.TestOpenEnum2.X1 + BLOCK_BODY FUN name:foo visibility:public modality:OPEN <> ($this:.TestOpenEnum2) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestOpenEnum2 BLOCK_BODY @@ -394,28 +302,16 @@ FILE fqName: fileName:/enumClassModality.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestAbstractEnum1 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestAbstractEnum1>]' - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum1.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestAbstractEnum1.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.TestAbstractEnum1.X1) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.TestAbstractEnum1.X1 - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestAbstractEnum1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum1.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestAbstractEnum1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestAbstractEnum1]' + FUN name:foo visibility:public modality:FINAL <> ($this:.TestAbstractEnum1.X1) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.TestAbstractEnum1.X1 + BLOCK_BODY FUN name:foo visibility:public modality:ABSTRACT <> ($this:.TestAbstractEnum1) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestAbstractEnum1 FUN name:values visibility:public modality:FINAL <> ($this:.TestAbstractEnum1) returnType:kotlin.Array<.TestAbstractEnum1> @@ -482,28 +378,16 @@ FILE fqName: fileName:/enumClassModality.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestAbstractEnum2 modality:FINAL visibility:public superTypes:[.IFoo; kotlin.Enum<.TestAbstractEnum2>]' - CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum2.X1 - CONSTRUCTOR visibility:public <> () returnType:.TestAbstractEnum2.X1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.TestAbstractEnum2.X1) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.TestAbstractEnum2.X1 - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:X1 + class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestAbstractEnum2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum2.X1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestAbstractEnum2' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:local superTypes:[.TestAbstractEnum2]' + FUN name:foo visibility:public modality:FINAL <> ($this:.TestAbstractEnum2.X1) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.TestAbstractEnum2.X1 + BLOCK_BODY FUN name:values visibility:public modality:FINAL <> ($this:.TestAbstractEnum2) returnType:kotlin.Array<.TestAbstractEnum2> $this: VALUE_PARAMETER name: type:.TestAbstractEnum2 BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt index 75a13472b73..c08e9a92e31 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.txt @@ -17,25 +17,13 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test0' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .Test0 declared in .Test0.' type=.Test0 origin=null - CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test0.ZERO - CONSTRUCTOR visibility:public <> () returnType:.Test0.ZERO [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:ZERO + class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[.Test0] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test0.ZERO + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test0' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[.Test0]' CONSTRUCTOR visibility:private <> () returnType:.Test0 BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test0' @@ -99,81 +87,21 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test1' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .Test1 declared in .Test1.' type=.Test1 origin=null - CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1.ZERO - CONSTRUCTOR visibility:public <> () returnType:.Test1.ZERO [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:public superTypes:[.Test1] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1.ONE - CONSTRUCTOR visibility:public <> () returnType:.Test1.ONE [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test1' - x: CONST Int type=kotlin.Int value=1 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:public superTypes:[.Test1]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test1.ONE) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .Test1 - $this: VALUE_PARAMETER name: type:.Test1.ONE - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.Test1) returnType:kotlin.Array<.Test1> [fake_override] - overridden: - public final fun values (): kotlin.Array<.Test1> declared in .Test1 - $this: VALUE_PARAMETER name: type:.Test1 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.Test1, value:kotlin.String) returnType:.Test1 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .Test1 declared in .Test1 - $this: VALUE_PARAMETER name: type:.Test1 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.Test1) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.Test1 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test1.ONE) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.Test1.ONE - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test1.ONE) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.Test1.ONE + ENUM_ENTRY name:ZERO + class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[.Test1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1.ZERO + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test1' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[.Test1]' + ENUM_ENTRY name:ONE + class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[.Test1] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1.ONE + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test1' + x: CONST Int type=kotlin.Int value=1 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[.Test1]' CONSTRUCTOR visibility:private <> () returnType:.Test1 BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test1' @@ -237,91 +165,31 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .Test2' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null receiver: GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null - CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.ZERO - CONSTRUCTOR visibility:public <> () returnType:.Test2.ZERO [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:foo visibility:public modality:FINAL <> ($this:.Test2.ZERO) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Test2.ZERO - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="ZERO" - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:public superTypes:[.Test2] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.ONE - CONSTRUCTOR visibility:public <> () returnType:.Test2.ONE [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test2' - x: CONST Int type=kotlin.Int value=1 - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:public superTypes:[.Test2]' - FUN name:foo visibility:public modality:FINAL <> ($this:.Test2.ONE) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.Test2.ONE - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="ONE" - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test2.ONE) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in .Test2 - $this: VALUE_PARAMETER name: type:.Test2.ONE - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.Test2) returnType:kotlin.Array<.Test2> [fake_override] - overridden: - public final fun values (): kotlin.Array<.Test2> declared in .Test2 - $this: VALUE_PARAMETER name: type:.Test2 - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.Test2, value:kotlin.String) returnType:.Test2 [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .Test2 declared in .Test2 - $this: VALUE_PARAMETER name: type:.Test2 - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.Test2) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.Test2 - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test2.ONE) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.Test2.ONE - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test2.ONE) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum + ENUM_ENTRY name:ZERO + class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[.Test2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.ZERO + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test2' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:local superTypes:[.Test2]' + FUN name:foo visibility:public modality:FINAL <> ($this:.Test2.ZERO) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Test2.ZERO + BLOCK_BODY + CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null + message: CONST String type=kotlin.String value="ZERO" + ENUM_ENTRY name:ONE + class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[.Test2] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2.ONE + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test2' + x: CONST Int type=kotlin.Int value=1 + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:local superTypes:[.Test2]' + FUN name:foo visibility:public modality:FINAL <> ($this:.Test2.ONE) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Test2.ONE + BLOCK_BODY + CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null + message: CONST String type=kotlin.String value="ONE" CONSTRUCTOR visibility:private <> () returnType:.Test2 BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test2' diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt index a2afb1a0181..4c86de87038 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.txt @@ -33,59 +33,35 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestEnum>]' - CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:public superTypes:[kotlin.Any] - annotations: - TestAnn(x = 'ENTRY1') - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum.ENTRY1 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum.ENTRY1 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:public superTypes:[kotlin.Any] - annotations: - TestAnn(x = 'ENTRY2') - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum.ENTRY2 - CONSTRUCTOR visibility:public <> () returnType:.TestEnum.ENTRY2 [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:x visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] - EXPRESSION_BODY - CONST Int type=kotlin.Int value=42 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestEnum.ENTRY2) returnType:kotlin.Int - correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.TestEnum.ENTRY2 + ENUM_ENTRY name:ENTRY1 + class: CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:local superTypes:[.TestEnum] + annotations: + TestAnn(x = 'ENTRY1') + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum.ENTRY1 + CONSTRUCTOR visibility:private <> () returnType:. [primary] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum.ENTRY2' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null - receiver: GET_VAR ': .TestEnum.ENTRY2 declared in .TestEnum.ENTRY2.' type=.TestEnum.ENTRY2 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 [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:local superTypes:[.TestEnum]' + ENUM_ENTRY name:ENTRY2 + class: CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:local superTypes:[.TestEnum] + annotations: + TestAnn(x = 'ENTRY2') + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum.ENTRY2 + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:local superTypes:[.TestEnum]' + PROPERTY name:x visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final] + EXPRESSION_BODY + CONST Int type=kotlin.Int value=42 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.TestEnum.ENTRY2) returnType:kotlin.Int + correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.TestEnum.ENTRY2 + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .TestEnum.ENTRY2' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .TestEnum.ENTRY2 declared in .TestEnum.ENTRY2.' type=.TestEnum.ENTRY2 origin=null FUN name:values visibility:public modality:FINAL <> ($this:.TestEnum) returnType:kotlin.Array<.TestEnum> $this: VALUE_PARAMETER name: type:.TestEnum BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt index a75a58f2bf9..a819b1da3ee 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.txt @@ -5,82 +5,34 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum<.En>]' - CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.A - CONSTRUCTOR visibility:public <> () returnType:.En.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:B modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.B - CONSTRUCTOR visibility:public <> () returnType:.En.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:C modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.C - CONSTRUCTOR visibility:public <> () returnType:.En.C [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:D modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.D - CONSTRUCTOR visibility:public <> () returnType:.En.D [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:D modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:A + class: CLASS ENUM_ENTRY name:A modality:FINAL visibility:local superTypes:[.En] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.A + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .En' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:A modality:FINAL visibility:local superTypes:[.En]' + ENUM_ENTRY name:B + class: CLASS ENUM_ENTRY name:B modality:FINAL visibility:local superTypes:[.En] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.B + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .En' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:B modality:FINAL visibility:local superTypes:[.En]' + ENUM_ENTRY name:C + class: CLASS ENUM_ENTRY name:C modality:FINAL visibility:local superTypes:[.En] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.C + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .En' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:C modality:FINAL visibility:local superTypes:[.En]' + ENUM_ENTRY name:D + class: CLASS ENUM_ENTRY name:D modality:FINAL visibility:local superTypes:[.En] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.D + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .En' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:D modality:FINAL visibility:local superTypes:[.En]' FUN name:values visibility:public modality:FINAL <> ($this:.En) returnType:kotlin.Array<.En> $this: VALUE_PARAMETER name: type:.En BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.fir.txt index 6531c92342e..653edf53379 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.fir.txt @@ -3,7 +3,7 @@ FILE fqName:test fileName:/fileAnnotations.kt A(x = 'File annotation') CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - Target(allowedTargets = GET_OBJECT 'CLASS ENUM_ENTRY name:FILE modality:FINAL visibility:unknown superTypes:[]' type=kotlin.annotation.AnnotationTarget) + Target(allowedTargets = GET_ENUM 'ENUM_ENTRY name:FILE' type=kotlin.annotation.AnnotationTarget) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:test.A CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:test.A [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt index e6053074cb5..13c2e6545e1 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.fir.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/typeAliasesWithAnnotations.kt CLASS ANNOTATION_CLASS name:TestAnn modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - Target(allowedTargets = GET_OBJECT 'CLASS ENUM_ENTRY name:TYPEALIAS modality:FINAL visibility:unknown superTypes:[]' type=kotlin.annotation.AnnotationTarget) + Target(allowedTargets = GET_ENUM 'ENUM_ENTRY name:TYPEALIAS' type=kotlin.annotation.AnnotationTarget) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:kotlin.String) returnType:.TestAnn [primary] VALUE_PARAMETER name:x index:0 type:kotlin.String diff --git a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.fir.txt index 343b502b0a3..b7119a05697 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.fir.txt @@ -1,7 +1,7 @@ FILE fqName: fileName:/typeParametersWithAnnotations.kt CLASS ANNOTATION_CLASS name:Anno modality:FINAL visibility:public superTypes:[kotlin.Annotation] annotations: - Target(allowedTargets = GET_OBJECT 'CLASS ENUM_ENTRY name:TYPE_PARAMETER modality:FINAL visibility:unknown superTypes:[]' type=kotlin.annotation.AnnotationTarget) + Target(allowedTargets = GET_ENUM 'ENUM_ENTRY name:TYPE_PARAMETER' type=kotlin.annotation.AnnotationTarget) $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Anno CONSTRUCTOR visibility:public <> () returnType:.Anno [primary] FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt index 0833c282c68..067a31133e0 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.txt @@ -5,44 +5,20 @@ FILE fqName: fileName:/expectedEnumClass.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public [expect] superTypes:[kotlin.Enum<.MyEnum>]' - CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.FOO - CONSTRUCTOR visibility:public <> () returnType:.MyEnum.FOO [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.BAR - CONSTRUCTOR visibility:public <> () returnType:.MyEnum.BAR [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:FOO + class: CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:local superTypes:[.MyEnum] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.FOO + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .MyEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:local superTypes:[.MyEnum]' + ENUM_ENTRY name:BAR + class: CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:local superTypes:[.MyEnum] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.BAR + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .MyEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:local superTypes:[.MyEnum]' FUN name:values visibility:public modality:FINAL <> ($this:.MyEnum) returnType:kotlin.Array<.MyEnum> $this: VALUE_PARAMETER name: type:.MyEnum BLOCK_BODY @@ -90,63 +66,27 @@ FILE fqName: fileName:/expectedEnumClass.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<.MyEnum>]' - CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.FOO - CONSTRUCTOR visibility:public <> () returnType:.MyEnum.FOO [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.BAR - CONSTRUCTOR visibility:public <> () returnType:.MyEnum.BAR [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any - CLASS ENUM_ENTRY name:BAZ modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.BAZ - CONSTRUCTOR visibility:public <> () returnType:.MyEnum.BAZ [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:BAZ modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:FOO + class: CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:local superTypes:[.MyEnum] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.FOO + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .MyEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:FOO modality:FINAL visibility:local superTypes:[.MyEnum]' + ENUM_ENTRY name:BAR + class: CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:local superTypes:[.MyEnum] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.BAR + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .MyEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:BAR modality:FINAL visibility:local superTypes:[.MyEnum]' + ENUM_ENTRY name:BAZ + class: CLASS ENUM_ENTRY name:BAZ modality:FINAL visibility:local superTypes:[.MyEnum] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum.BAZ + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .MyEnum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:BAZ modality:FINAL visibility:local superTypes:[.MyEnum]' FUN name:values visibility:public modality:FINAL <> ($this:.MyEnum) returnType:kotlin.Array<.MyEnum> $this: VALUE_PARAMETER name: type:.MyEnum BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt index 75eefe439a9..3a450ab4e27 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt @@ -5,52 +5,40 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:X modality:FINAL visibility:public superTypes:[kotlin.Enum<.X>]' - CLASS ENUM_ENTRY name:B modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.X.B - CONSTRUCTOR visibility:public <> () returnType:.X.B [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:value2 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.String visibility:private [final] - EXPRESSION_BODY - CONST String type=kotlin.String value="OK" - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.X.B) returnType:kotlin.String - correspondingProperty: PROPERTY name:value2 visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.X.B + ENUM_ENTRY name:B + class: CLASS ENUM_ENTRY name:B modality:FINAL visibility:local superTypes:[.X] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.X.B + CONSTRUCTOR visibility:private <> () returnType:. [primary] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .X.B' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.String visibility:private [final]' type=kotlin.String origin=null - receiver: GET_VAR ': .X.B declared in .X.B.' type=.X.B origin=null - PROPERTY name:value visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Function0 visibility:private [final] - EXPRESSION_BODY - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.X.B) returnType:kotlin.String - $this: VALUE_PARAMETER name: type:.X.B - BLOCK_BODY - CALL 'public final fun (): kotlin.String declared in .X.B' type=kotlin.String origin=null - $this: GET_VAR ': .X.B declared in .X.B' type=.X.B origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.X.B) returnType:kotlin.Function0 - correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.X.B - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function0 declared in .X.B' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Function0 visibility:private [final]' type=kotlin.Function0 origin=null - receiver: GET_VAR ': .X.B declared in .X.B.' type=.X.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 [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .X' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:B modality:FINAL visibility:local superTypes:[.X]' + PROPERTY name:value2 visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.String visibility:private [final] + EXPRESSION_BODY + CONST String type=kotlin.String value="OK" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.X.B) returnType:kotlin.String + correspondingProperty: PROPERTY name:value2 visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.X.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in .X.B' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.String visibility:private [final]' type=kotlin.String origin=null + receiver: GET_VAR ': .X.B declared in .X.B.' type=.X.B origin=null + PROPERTY name:value visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Function0 visibility:private [final] + EXPRESSION_BODY + FUN_EXPR type=kotlin.Function0 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.X.B) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:.X.B + BLOCK_BODY + CALL 'public final fun (): kotlin.String declared in .X.B' type=kotlin.String origin=null + $this: GET_VAR ': . declared in .' type=. origin=null + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.X.B) returnType:kotlin.Function0 + correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:.X.B + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function0 declared in .X.B' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Function0 visibility:private [final]' type=kotlin.Function0 origin=null + receiver: GET_VAR ': .X.B declared in .X.B.' type=.X.B origin=null PROPERTY name:value visibility:public modality:ABSTRACT [val] FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.X) returnType:kotlin.Function0 correspondingProperty: PROPERTY name:value visibility:public modality:ABSTRACT [val] @@ -101,4 +89,4 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' CALL 'public abstract fun invoke (): kotlin.String [operator] declared in kotlin.Function0' type=kotlin.String origin=null $this: CALL 'public abstract fun (): kotlin.Function0 declared in .X' type=kotlin.Function0 origin=null - $this: GET_OBJECT 'CLASS ENUM_ENTRY name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X + $this: GET_ENUM 'ENUM_ENTRY name:B' type=.X diff --git a/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt b/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt index 5d7ba410c29..c610588e65c 100644 --- a/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectAsCallable.fir.txt @@ -24,25 +24,13 @@ FILE fqName: fileName:/objectAsCallable.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum<.En>]' - CLASS ENUM_ENTRY name:X modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.X - CONSTRUCTOR visibility:public <> () returnType:.En.X [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:X + class: CLASS ENUM_ENTRY name:X modality:FINAL visibility:local superTypes:[.En] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.X + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .En' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X modality:FINAL visibility:local superTypes:[.En]' FUN name:values visibility:public modality:FINAL <> ($this:.En) returnType:kotlin.Array<.En> $this: VALUE_PARAMETER name: type:.En BLOCK_BODY @@ -107,12 +95,13 @@ FILE fqName: fileName:/objectAsCallable.kt RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:IrErrorType visibility:private [final,static]' type=IrErrorType origin=null PROPERTY name:test2 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:private [final,static] + FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:private [final,static] EXPRESSION_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType - CONST Int type=kotlin.Int value=42 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:IrErrorType + CALL 'public final fun invoke (i: kotlin.Int): kotlin.Int [operator] declared in ' type=kotlin.Int origin=null + $receiver: GET_ENUM 'ENUM_ENTRY name:X' type=.En + i: CONST Int type=kotlin.Int value=42 + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): IrErrorType declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:IrErrorType visibility:private [final,static]' type=IrErrorType origin=null + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt index f256f0abbc5..176b516adc5 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.txt @@ -26,63 +26,15 @@ FILE fqName: fileName:/temporaryInEnumEntryInitializer.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.String? declared in .En' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.String? visibility:private [final]' type=kotlin.String? origin=null receiver: GET_VAR ': .En declared in .En.' type=.En origin=null - CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:public superTypes:[.En] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.ENTRY - CONSTRUCTOR visibility:public <> () returnType:.En.ENTRY [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.String?) [primary] declared in .En' - x: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String? origin=null - $this: CALL 'public final fun (): kotlin.Any? declared in ' type=kotlin.Any? origin=null - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:public superTypes:[.En]' - PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.En.ENTRY) returnType:kotlin.String? [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:x visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String? declared in .En - $this: VALUE_PARAMETER name: type:.En.ENTRY - FUN FAKE_OVERRIDE name:values visibility:public modality:FINAL <> ($this:.En) returnType:kotlin.Array<.En> [fake_override] - overridden: - public final fun values (): kotlin.Array<.En> declared in .En - $this: VALUE_PARAMETER name: type:.En - FUN FAKE_OVERRIDE name:valueOf visibility:public modality:FINAL <> ($this:.En, value:kotlin.String) returnType:.En [fake_override] - overridden: - public final fun valueOf (value: kotlin.String): .En declared in .En - $this: VALUE_PARAMETER name: type:.En - VALUE_PARAMETER name:value index:0 type:kotlin.String - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.En) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.En - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.En.ENTRY) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.En.ENTRY - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.En.ENTRY) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:.En.ENTRY + ENUM_ENTRY name:ENTRY + class: CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:local superTypes:[.En] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.En.ENTRY + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.String?) [primary] declared in .En' + x: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String? origin=null + $this: CALL 'public final fun (): kotlin.Any? declared in ' type=kotlin.Any? origin=null + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:local superTypes:[.En]' FUN name:values visibility:public modality:FINAL <> ($this:.En) returnType:kotlin.Array<.En> $this: VALUE_PARAMETER name: type:.En BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/values.fir.txt b/compiler/testData/ir/irText/expressions/values.fir.txt index e77d6648048..13129641ebc 100644 --- a/compiler/testData/ir/irText/expressions/values.fir.txt +++ b/compiler/testData/ir/irText/expressions/values.fir.txt @@ -5,25 +5,13 @@ FILE fqName: fileName:/values.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Enum modality:FINAL visibility:public superTypes:[kotlin.Enum<.Enum>]' - CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Enum.A - CONSTRUCTOR visibility:public <> () returnType:.Enum.A [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any - $this: VALUE_PARAMETER name: 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: 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: type:kotlin.Any + ENUM_ENTRY name:A + class: CLASS ENUM_ENTRY name:A modality:FINAL visibility:local superTypes:[.Enum] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Enum.A + CONSTRUCTOR visibility:private <> () returnType:. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Enum' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:A modality:FINAL visibility:local superTypes:[.Enum]' FUN name:values visibility:public modality:FINAL <> ($this:.Enum) returnType:kotlin.Array<.Enum> $this: VALUE_PARAMETER name: type:.Enum BLOCK_BODY @@ -134,7 +122,7 @@ FILE fqName: fileName:/values.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:.Enum BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): .Enum declared in ' - GET_OBJECT 'CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.Enum + GET_ENUM 'ENUM_ENTRY name:A' type=.Enum FUN name:test2 visibility:public modality:FINAL <> () returnType:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): .A declared in ' diff --git a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt index 29bb0d86f72..88791dab590 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.fir.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.fir.txt @@ -1,27 +1,23 @@ FILE fqName: fileName:/enumEntry.kt - CLASS ENUM_CLASS name:Z modality:OPEN visibility:public superTypes:[kotlin.Enum<.Z>] + CLASS ENUM_CLASS name:Z modality:FINAL visibility:public superTypes:[kotlin.Enum<.Z>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z - CONSTRUCTOR visibility:private <> () returnType:.Z [primary]h + CONSTRUCTOR visibility:private <> () returnType:.Z [primary] BLOCK_BODY - ENUM_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' - : .Z - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Z modality:OPEN visibility:public superTypes:[kotlin.Enum<.Z>]' + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Z modality:FINAL visibility:public superTypes:[kotlin.Enum<.Z>]' ENUM_ENTRY name:ENTRY - init: ENUM_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Z.ENTRY' - class: CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:public superTypes:[.Z] + class: CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:local superTypes:[.Z] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z.ENTRY - CONSTRUCTOR visibility:private <> () returnType:.Z.ENTRY [primary] + CONSTRUCTOR visibility:private <> () returnType:. [primary] BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - ENUM_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Z' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:public superTypes:[.Z]' + DELEGATING_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Z' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:local superTypes:[.Z]' FUN name:test visibility:public modality:FINAL <> ($this:.Z.ENTRY) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Z.ENTRY BLOCK_BODY CLASS CLASS name:A modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Z.ENTRY.A - CONSTRUCTOR visibility:public <> ($this:.Z.ENTRY) returnType:.Z.ENTRY.A [primary] - $outer: VALUE_PARAMETER name: type:.Z.ENTRY + CONSTRUCTOR visibility:public <> () returnType:IrErrorType [primary] BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' @@ -29,7 +25,7 @@ FILE fqName: fileName:/enumEntry.kt $this: VALUE_PARAMETER name: type:.Z.ENTRY.A BLOCK_BODY CALL 'public final fun test (): kotlin.Unit declared in .Z.ENTRY' type=kotlin.Unit origin=null - $this: GET_ENUM 'ENUM_ENTRY name:ENTRY' type=.Z.ENTRY + $this: GET_VAR ': . declared in .' type=. 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 [operator] declared in kotlin.Any @@ -43,95 +39,44 @@ FILE fqName: fileName:/enumEntry.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Any [fake_override] - overridden: - protected final fun clone (): kotlin.Any [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Unit [fake_override] - overridden: - protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:java.lang.Class<.Z?>? [fake_override] - overridden: - public final fun getDeclaringClass (): java.lang.Class<.Z?>? [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>, other:.Z) returnType:kotlin.Int [fake_override,operator] - overridden: - public final fun compareTo (other: .Z): kotlin.Int [fake_override,operator] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - VALUE_PARAMETER name:other index:0 type:.Z - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Int [fake_override] - overridden: - public final fun hashCode (): kotlin.Int [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.String [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - overridden: - public final fun (): kotlin.Int [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<.Z>) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String [fake_override] declared in .Z - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Any [fake_override] + FUN name:values visibility:public modality:FINAL <> ($this:.Z) returnType:kotlin.Array<.Z> + $this: VALUE_PARAMETER name: type:.Z + BLOCK_BODY + FUN name:valueOf visibility:public modality:FINAL <> ($this:.Z, value:kotlin.String) returnType:.Z + $this: VALUE_PARAMETER name: type:.Z + VALUE_PARAMETER name:value index:0 type:kotlin.String + BLOCK_BODY + FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [fake_override] overridden: protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Unit [fake_override] - overridden: - protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:java.lang.Class<.Z?>? [fake_override] - overridden: - public final fun getDeclaringClass (): java.lang.Class? declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>, other:.Z) returnType:kotlin.Int [fake_override,operator] + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.Z) returnType:kotlin.Int [fake_override,operator] overridden: public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:.Z - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> + $this: VALUE_PARAMETER name: type:kotlin.Enum VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] overridden: public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.String [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Z) returnType:kotlin.String [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] overridden: public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> + $this: VALUE_PARAMETER name: type:.Z PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<.Z>) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Z) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] overridden: public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<.Z>) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum<.Z> - FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.Z> - SYNTHETIC_BODY kind=ENUM_VALUES - FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.Z - VALUE_PARAMETER name:value index:0 type:kotlin.String - SYNTHETIC_BODY kind=ENUM_VALUEOF - - - + $this: VALUE_PARAMETER name: type:.Z