Update test for the builder inference and add new ones

This commit is contained in:
Victor Petukhov
2021-05-21 15:34:52 +03:00
parent 31ed1ad5d9
commit fd5169186e
46 changed files with 2874 additions and 215 deletions
@@ -0,0 +1,23 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -UNCHECKED_CAST -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE
// WITH_RUNTIME
// FILE: main.kt
import kotlin.experimental.ExperimentalTypeInference
@UseExperimental(ExperimentalTypeInference::class)
fun <R> build(@BuilderInference block: TestInterface<R>.() -> Unit) {}
interface TestInterface<R> {
fun emit(r: R)
fun get(): R
}
fun box(): String {
build myLabel@ {
emit("")
val x = this@myLabel
""
}
return "OK"
}