Move tests for builder inference into the corresponding directory

This commit is contained in:
Victor Petukhov
2020-12-23 14:29:03 +03:00
parent 9b148325fe
commit 39e579db91
13 changed files with 43 additions and 0 deletions
@@ -0,0 +1,20 @@
// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: STDLIB_COLLECTIONS
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION
// WITH_RUNTIME
@OptIn(ExperimentalStdlibApi::class)
fun test(s: String?): Int {
val list = buildList {
s?.let(::add)
}
return list.size
}
fun box(): String {
return when (test("hello")) {
1 -> "OK"
else -> "Error"
}
}