FILE fqName:<root> fileName:/implicitCastToTypeParameter.kt
  FUN name:test1 visibility:public modality:FINAL <T> ($receiver:kotlin.Any) returnType:T? flags:inline
    TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any]
      superClassifiers:
        CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
    $receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
    BLOCK_BODY
      RETURN type=kotlin.Nothing from='test1() on Any: T?'
        WHEN type=T? origin=null
          BRANCH
            if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T
              typeOperand: TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any]
              GET_VAR 'this@test1: Any' type=kotlin.Any origin=null
            then: TYPE_OP type=T origin=IMPLICIT_CAST typeOperand=T
              typeOperand: TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any]
              GET_VAR 'this@test1: Any' type=kotlin.Any origin=null
          BRANCH
            if: CONST Boolean type=kotlin.Boolean value=true
            then: CONST Null type=kotlin.Nothing? value=null
  CLASS INTERFACE name:Foo modality:ABSTRACT visibility:public flags:
    $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:Foo<T> flags:
    superClasses:
      CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
    TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
      superClassifiers:
        CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
    FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
      overridden:
        FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
      $this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
      VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
    FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
      overridden:
        FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
      $this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
    FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
      overridden:
        FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
      $this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
  PROPERTY name:asT type:T? visibility:public modality:FINAL flags:val
    FUN name:<get-asT> visibility:public modality:FINAL <T> ($receiver:Foo<T>) returnType:T? flags:inline
      TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any]
        superClassifiers:
          CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
      $receiver: VALUE_PARAMETER name:<this> type:Foo<T> flags:
      BLOCK_BODY
        RETURN type=kotlin.Nothing from='<get-asT>() on Foo<T>: T?'
          WHEN type=T? origin=null
            BRANCH
              if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=T
                typeOperand: TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any]
                GET_VAR 'this@asT: Foo<T>' type=Foo<T> origin=null
              then: TYPE_OP type=T origin=IMPLICIT_CAST typeOperand=T
                typeOperand: TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any]
                GET_VAR 'this@asT: Foo<T>' type=Foo<T> origin=null
            BRANCH
              if: CONST Boolean type=kotlin.Boolean value=true
              then: CONST Null type=kotlin.Nothing? value=null
  CLASS CLASS name:Bar modality:FINAL visibility:public flags:
    $this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:Bar<T> flags:
    superClasses:
      CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
    TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
      superClassifiers:
        CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
    CONSTRUCTOR visibility:public <> () returnType:Bar<T> flags:
      BLOCK_BODY
        DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
        INSTANCE_INITIALIZER_CALL classDescriptor='Bar'
    FUN name:test visibility:public modality:FINAL <> ($this:Bar<T>, arg:kotlin.Any) returnType:Unit flags:
      $this: VALUE_PARAMETER name:<this> type:Bar<T> flags:
      VALUE_PARAMETER name:arg index:0 type:kotlin.Any flags:
      BLOCK_BODY
        TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
          TYPE_OP type=T origin=CAST typeOperand=T
            typeOperand: TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
            GET_VAR 'value-parameter arg: Any' type=kotlin.Any origin=null
        CALL 'useT(T): Unit' type=kotlin.Unit origin=null
          $this: GET_VAR 'this@Bar: Bar<T>' type=Bar<T> origin=null
          t: TYPE_OP type=T origin=IMPLICIT_CAST typeOperand=T
            typeOperand: TYPE_PARAMETER name:T index:0 variance: upperBounds:[kotlin.Any?]
            GET_VAR 'value-parameter arg: Any' type=kotlin.Any origin=null
    FUN name:useT visibility:public modality:FINAL <> ($this:Bar<T>, t:T) returnType:Unit flags:
      $this: VALUE_PARAMETER name:<this> type:Bar<T> flags:
      VALUE_PARAMETER name:t index:0 type:T flags:
      BLOCK_BODY
    FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
      overridden:
        FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:Boolean flags:
      $this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
      VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
    FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
      overridden:
        FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:Int flags:
      $this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
    FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
      overridden:
        FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:String flags:
      $this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
