fun <T : Any?> useContext(<this>: T, block: Function1<T, Unit>) {
}

fun test() {
  with<Int, Unit>(receiver = 42, block = local fun Int.<anonymous>() {
    useContext<Int>(<this> = $this$with, block = local fun <anonymous>(i: Int) {
      i.toDouble() /*~> Unit */
    }
)
  }
)
}
