fun <T : Any?> castFun(x: Any): T {
  return x as T
}

fun <T : Any?> Any.castExtFun(): T {
  return <this> as T
}

val <T : Any?> T.castExtVal: T
  get(): T {
    return <this> as T
  }

class Host<T : Any?> {
  constructor() /* primary */ {
    super/*Any*/()
    /* <init>() */

  }

  fun castMemberFun(x: Any): T {
    return x as T
  }

  fun <TF : Any?> castGenericMemberFun(x: Any): TF {
    return x as TF
  }

  fun Any.castMemberExtFun(): T {
    return <this> as T
  }

  fun <TF : Any?> Any.castGenericMemberExtFun(): TF {
    return <this> as TF
  }

  val Any.castMemberExtVal: T
    get(): T {
      return <this> as T
    }

  val <TV : Any?> TV.castGenericMemberExtVal: TV
    get(): TV {
      return <this> as TV
    }

}
