[Tests] Consider dependent fragments in IR handlers

This commit is contained in:
Ivan Kochurkin
2023-05-08 17:07:17 +02:00
committed by Space Team
parent 988927154e
commit b22e89e91d
9 changed files with 155 additions and 44 deletions
@@ -1,3 +1,62 @@
Module: <lib>
FILE fqName:<root> fileName:/lib.kt
CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public [expect] superTypes:[kotlin.Enum<<root>.MyEnum>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyEnum
CONSTRUCTOR visibility:private <> () returnType:<root>.MyEnum [primary,expect]
ENUM_ENTRY name:FOO
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary,expect] declared in <root>.MyEnum'
ENUM_ENTRY name:BAR
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary,expect] declared in <root>.MyEnum'
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.MyEnum> [expect]
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.MyEnum [expect]
VALUE_PARAMETER name:value index:0 type:kotlin.String
PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [expect,val]
FUN ENUM_CLASS_SPECIAL_MEMBER name:<get-entries> visibility:public modality:FINAL <> () returnType:kotlin.enums.EnumEntries<<root>.MyEnum>
correspondingProperty: PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [expect,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 [expect,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>.MyEnum) returnType:kotlin.Int [expect,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>.MyEnum
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>, other:kotlin.Any?) returnType:kotlin.Boolean [expect,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 [expect,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 [expect,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 [expect,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 [expect,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 [expect,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 [expect,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>
Module: main
FILE fqName:<root> fileName:/main.kt
CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.MyEnum>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyEnum
@@ -1,3 +1,22 @@
// MODULE: <lib>
// FILE: lib.kt
expect enum class MyEnum : Enum<MyEnum> {
private expect constructor() /* primary */
FOO = MyEnum()
BAR = MyEnum()
expect fun values(): Array<MyEnum>
expect fun valueOf(value: String): MyEnum
expect val entries: EnumEntries<MyEnum>
get(): EnumEntries<MyEnum> /* Synthetic body for ENUM_ENTRIES */
}
// MODULE: main
// FILE: main.kt
enum class MyEnum : Enum<MyEnum> {
@@ -21,3 +40,4 @@ enum class MyEnum : Enum<MyEnum> {
get(): EnumEntries<MyEnum> /* Synthetic body for ENUM_ENTRIES */
}