fun <F : CharSequence> F.bar() {
}

inline fun <reified T : CharSequence> test_1(x: Any) {
  when {
    x is T -> { // BLOCK
      bar<T>(/* <this> = x /*as T */ */)
    }
  }
}

fun test_2(x: Any?) {
  when {
    x is CharSequence -> { // BLOCK
      bar<CharSequence>(/* <this> = x /*as CharSequence */ */)
    }
  }
}

