Files
kotlin-fork/compiler/testData/codegen/box/annotations/selfReferentialAnnotation.fir.ir.txt
T
Kirill Rakhman d1ce55cbd2 [FIR2IR] Fix infinite loop between annotation and annotation parameter
When an annotation constructor value parameter is annotated with the
very same annotation, FIR2IR went in an infinite loop when trying
to generate it.
To fix this, the constructor is added to the Fir2IrDeclarationStorage
cache before generating the value parameters.
To accommodate for the missing parameters, the value arguments count
is determined using the FIR.
2023-05-30 15:53:12 +00:00

160 lines
13 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/selfReferentialAnnotation.kt
CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Ann
CONSTRUCTOR visibility:public <> (e:kotlin.Int) returnType:<root>.Ann [primary]
VALUE_PARAMETER name:e index:0 type:kotlin.Int
annotations:
Ann(e = '1')
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Ann modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:e visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:e type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
GET_VAR 'e: kotlin.Int declared in <root>.Ann.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-e> visibility:public modality:FINAL <> ($this:<root>.Ann) returnType:kotlin.Int
correspondingProperty: PROPERTY name:e visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.Ann
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-e> (): kotlin.Int declared in <root>.Ann'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:e type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Ann declared in <root>.Ann.<get-e>' type=<root>.Ann 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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ANNOTATION_CLASS name:MyRequiresOptIn modality:OPEN visibility:public superTypes:[kotlin.Annotation]
annotations:
MyRequiresOptIn(a = '', b = GET_ENUM 'ENUM_ENTRY name:ERROR' type=<root>.MyRequiresOptIn.MyLevel)
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyRequiresOptIn
CONSTRUCTOR visibility:public <> (a:kotlin.String, b:<root>.MyRequiresOptIn.MyLevel) returnType:<root>.MyRequiresOptIn [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.String
EXPRESSION_BODY
CONST String type=kotlin.String value=""
VALUE_PARAMETER name:b index:1 type:<root>.MyRequiresOptIn.MyLevel
annotations:
MyRequiresOptIn(a = '', b = GET_ENUM 'ENUM_ENTRY name:WARNING' type=<root>.MyRequiresOptIn.MyLevel)
EXPRESSION_BODY
GET_ENUM 'ENUM_ENTRY name:ERROR' type=<root>.MyRequiresOptIn.MyLevel
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:MyRequiresOptIn modality:OPEN visibility:public superTypes:[kotlin.Annotation]'
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]
EXPRESSION_BODY
GET_VAR 'a: kotlin.String declared in <root>.MyRequiresOptIn.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.MyRequiresOptIn) returnType:kotlin.String
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.MyRequiresOptIn
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-a> (): kotlin.String declared in <root>.MyRequiresOptIn'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyRequiresOptIn declared in <root>.MyRequiresOptIn.<get-a>' type=<root>.MyRequiresOptIn origin=null
PROPERTY name:b visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:b type:<root>.MyRequiresOptIn.MyLevel visibility:private [final]
EXPRESSION_BODY
GET_VAR 'b: <root>.MyRequiresOptIn.MyLevel declared in <root>.MyRequiresOptIn.<init>' type=<root>.MyRequiresOptIn.MyLevel origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-b> visibility:public modality:FINAL <> ($this:<root>.MyRequiresOptIn) returnType:<root>.MyRequiresOptIn.MyLevel
correspondingProperty: PROPERTY name:b visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.MyRequiresOptIn
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-b> (): <root>.MyRequiresOptIn.MyLevel declared in <root>.MyRequiresOptIn'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:<root>.MyRequiresOptIn.MyLevel visibility:private [final]' type=<root>.MyRequiresOptIn.MyLevel origin=null
receiver: GET_VAR '<this>: <root>.MyRequiresOptIn declared in <root>.MyRequiresOptIn.<get-b>' type=<root>.MyRequiresOptIn origin=null
CLASS ENUM_CLASS name:MyLevel modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.MyRequiresOptIn.MyLevel>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyRequiresOptIn.MyLevel
CONSTRUCTOR visibility:private <> () returnType:<root>.MyRequiresOptIn.MyLevel [primary]
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
<E>: <root>.MyRequiresOptIn.MyLevel
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:MyLevel modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.MyRequiresOptIn.MyLevel>]'
ENUM_ENTRY name:WARNING
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.MyRequiresOptIn.MyLevel'
ENUM_ENTRY name:ERROR
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.MyRequiresOptIn.MyLevel'
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.MyRequiresOptIn.MyLevel>
SYNTHETIC_BODY kind=ENUM_VALUES
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.MyRequiresOptIn.MyLevel
VALUE_PARAMETER name:value index:0 type:kotlin.String
SYNTHETIC_BODY kind=ENUM_VALUEOF
PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [val]
FUN ENUM_CLASS_SPECIAL_MEMBER name:<get-entries> visibility:public modality:FINAL <> () returnType:kotlin.enums.EnumEntries<<root>.MyRequiresOptIn.MyLevel>
correspondingProperty: PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [val]
SYNTHETIC_BODY kind=ENUM_ENTRIES
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
overridden:
protected final fun clone (): kotlin.Any declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>, other:<root>.MyRequiresOptIn.MyLevel) 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:<this> type:kotlin.Enum<E of kotlin.Enum>
VALUE_PARAMETER name:other index:0 type:<root>.MyRequiresOptIn.MyLevel
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<E of 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:<this> type:kotlin.Enum<E of kotlin.Enum>
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Int [fake_override]
overridden:
public final fun hashCode (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val]
annotations:
IntrinsicConstEvaluation
overridden:
public final name: kotlin.String [val]
FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.String [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val]
overridden:
public final fun <get-name> (): kotlin.String declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val]
overridden:
public final ordinal: kotlin.Int [val]
FUN FAKE_OVERRIDE name:<get-ordinal> visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Int [fake_override]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val]
overridden:
public final fun <get-ordinal> (): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.MyRequiresOptIn.MyLevel?>? [fake_override]
overridden:
public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Unit [fake_override]
overridden:
protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum<E of kotlin.Enum>
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 [fake_override,operator] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Annotation
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CONST String type=kotlin.String value="OK"