FILE fqName:<root> fileName:/whenSmartCastToEnum.kt
  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
        ENUM_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
          <E>: <root>.En
        INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:En modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.En>]'
    ENUM_ENTRY name:A
      init: EXPRESSION_BODY
        ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.En'
    ENUM_ENTRY name:B
      init: EXPRESSION_BODY
        ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.En'
    ENUM_ENTRY name:C
      init: EXPRESSION_BODY
        ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.En'
    PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val]
      overridden:
        public final name: kotlin.String [val]
      FUN FAKE_OVERRIDE name:<get-name> visibility:public modality:FINAL <> ($this:kotlin.Enum<<root>.En>) 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<<root>.En>
    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<<root>.En>) 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<<root>.En>
    FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<<root>.En>) returnType:kotlin.Any [fake_override]
      overridden:
        protected final fun clone (): kotlin.Any declared in kotlin.Enum
      $this: VALUE_PARAMETER name:<this> type:kotlin.Enum<<root>.En>
    FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<<root>.En>, other:<root>.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:<this> type:kotlin.Enum<<root>.En>
      VALUE_PARAMETER name:other index:0 type:<root>.En
    FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<<root>.En>, 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<<root>.En>
      VALUE_PARAMETER name:other index:0 type:kotlin.Any?
    FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<<root>.En>) 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<<root>.En>
    FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<<root>.En>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] <root>.En?>? [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<<root>.En>
    FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<<root>.En>) returnType:kotlin.Int [fake_override]
      overridden:
        public final fun hashCode (): kotlin.Int declared in kotlin.Enum
      $this: VALUE_PARAMETER name:<this> type:kotlin.Enum<<root>.En>
    FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<<root>.En>) returnType:kotlin.String [fake_override]
      overridden:
        public open fun toString (): kotlin.String declared in kotlin.Enum
      $this: VALUE_PARAMETER name:<this> type:kotlin.Enum<<root>.En>
    FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.En>
      SYNTHETIC_BODY kind=ENUM_VALUES
    FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.En
      VALUE_PARAMETER name:value index:0 type:kotlin.String
      SYNTHETIC_BODY kind=ENUM_VALUEOF
  FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
    BLOCK_BODY
      VAR name:r type:kotlin.String [var]
        CONST String type=kotlin.String value=""
      VAR name:x type:kotlin.Any? [val]
        GET_ENUM 'ENUM_ENTRY name:A' type=<root>.En
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.En
            GET_VAR 'val x: kotlin.Any? [val] declared in <root>.test' type=kotlin.Any? origin=null
          then: BLOCK type=kotlin.Unit origin=null
            BLOCK type=kotlin.Unit origin=WHEN
              VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.En [val]
                TYPE_OP type=<root>.En origin=IMPLICIT_CAST typeOperand=<root>.En
                  GET_VAR 'val x: kotlin.Any? [val] declared in <root>.test' type=kotlin.Any? origin=null
              WHEN type=kotlin.Unit origin=WHEN
                BRANCH
                  if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
                    arg0: GET_VAR 'val tmp_0: <root>.En [val] declared in <root>.test' type=<root>.En origin=null
                    arg1: GET_ENUM 'ENUM_ENTRY name:A' type=<root>.En
                  then: BLOCK type=kotlin.Unit origin=null
                    SET_VAR 'var r: kotlin.String [var] declared in <root>.test' type=kotlin.Unit origin=EQ
                      CONST String type=kotlin.String value="when1"
                BRANCH
                  if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
                    arg0: GET_VAR 'val tmp_0: <root>.En [val] declared in <root>.test' type=<root>.En origin=null
                    arg1: GET_ENUM 'ENUM_ENTRY name:B' type=<root>.En
                  then: BLOCK type=kotlin.Unit origin=null
                BRANCH
                  if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
                    arg0: GET_VAR 'val tmp_0: <root>.En [val] declared in <root>.test' type=<root>.En origin=null
                    arg1: GET_ENUM 'ENUM_ENTRY name:C' type=<root>.En
                  then: BLOCK type=kotlin.Unit origin=null
      VAR name:y type:kotlin.Any [val]
        GET_ENUM 'ENUM_ENTRY name:A' type=<root>.En
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.En
            GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
          then: BLOCK type=kotlin.Unit origin=null
            BLOCK type=kotlin.Unit origin=WHEN
              VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.En [val]
                TYPE_OP type=<root>.En origin=IMPLICIT_CAST typeOperand=<root>.En
                  GET_VAR 'val y: kotlin.Any [val] declared in <root>.test' type=kotlin.Any origin=null
              WHEN type=kotlin.Unit origin=WHEN
                BRANCH
                  if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
                    arg0: GET_VAR 'val tmp_1: <root>.En [val] declared in <root>.test' type=<root>.En origin=null
                    arg1: GET_ENUM 'ENUM_ENTRY name:A' type=<root>.En
                  then: BLOCK type=kotlin.Unit origin=null
                    SET_VAR 'var r: kotlin.String [var] declared in <root>.test' type=kotlin.Unit origin=EQ
                      CONST String type=kotlin.String value="when2"
                BRANCH
                  if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
                    arg0: GET_VAR 'val tmp_1: <root>.En [val] declared in <root>.test' type=<root>.En origin=null
                    arg1: GET_ENUM 'ENUM_ENTRY name:B' type=<root>.En
                  then: BLOCK type=kotlin.Unit origin=null
                BRANCH
                  if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
                    arg0: GET_VAR 'val tmp_1: <root>.En [val] declared in <root>.test' type=<root>.En origin=null
                    arg1: GET_ENUM 'ENUM_ENTRY name:C' type=<root>.En
                  then: BLOCK type=kotlin.Unit origin=null
