[FIR] Fix self-type for enum

This commit is contained in:
Simon Ogorodnik
2019-11-19 21:07:32 +03:00
parent 26113b1e0f
commit dbf0742c00
23 changed files with 180 additions and 165 deletions
@@ -126,7 +126,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]
CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum>]
annotations:
TestAnn(x = 'enum')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum
@@ -134,7 +134,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
<E>: <none>
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum>]'
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.Array<<root>.TestEnum>
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
BLOCK_BODY
@@ -146,11 +146,11 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
overridden:
protected final fun clone (): kotlin.Any declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int [fake_override]
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:<root>.TestEnum) returnType:kotlin.Int [fake_override]
overridden:
public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum
VALUE_PARAMETER name:other index:0 type:<root>.TestEnum
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override]
overridden:
public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum
@@ -27,13 +27,13 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]
CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
<E>: <none>
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum>]'
CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:public superTypes:[kotlin.Any]
annotations:
TestAnn(x = 'ENTRY1')
@@ -98,11 +98,11 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
overridden:
protected final fun clone (): kotlin.Any declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int [fake_override]
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:<root>.TestEnum) returnType:kotlin.Int [fake_override]
overridden:
public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum
VALUE_PARAMETER name:other index:0 type:<root>.TestEnum
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override]
overridden:
public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum
@@ -1,11 +1,11 @@
FILE fqName:<root> fileName:/enumsInAnnotationArguments.kt
CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum]
CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.En>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.En
CONSTRUCTOR visibility:private <> () returnType:<root>.En [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
<E>: <none>
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.En>]'
CLASS ENUM_ENTRY name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.En.A
CONSTRUCTOR visibility:public <> () returnType:<root>.En.A [primary]
@@ -93,11 +93,11 @@ FILE fqName:<root> fileName:/enumsInAnnotationArguments.kt
overridden:
protected final fun clone (): kotlin.Any declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:E of kotlin.Enum) returnType:kotlin.Int [fake_override]
FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:<root>.En) returnType:kotlin.Int [fake_override]
overridden:
public final fun compareTo (other: E of kotlin.Enum): kotlin.Int declared in kotlin.Enum
$this: VALUE_PARAMETER name:<this> type:kotlin.Enum
VALUE_PARAMETER name:other index:0 type:E of kotlin.Enum
VALUE_PARAMETER name:other index:0 type:<root>.En
FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override]
overridden:
public final fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Enum