c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
25 lines
450 B
Kotlin
Vendored
25 lines
450 B
Kotlin
Vendored
// !OPT_IN: kotlin.RequiresOptIn
|
|
// WITH_STDLIB
|
|
|
|
// ISSUE: KT-35684
|
|
|
|
import kotlin.experimental.ExperimentalTypeInference
|
|
|
|
fun test() {
|
|
sequence {
|
|
yield(materialize())
|
|
yield(materialize<Int>())
|
|
}
|
|
}
|
|
|
|
@OptIn(ExperimentalTypeInference::class)
|
|
fun <U> sequence(@BuilderInference block: suspend Inv<U>.() -> Unit) {}
|
|
|
|
interface Inv<T> {
|
|
fun yield(element: T)
|
|
}
|
|
|
|
fun <K> materialize(): Inv<K> = TODO()
|
|
|
|
fun box(): String = "OK"
|