Add several new SMAP tests

Some of them are still failing and suppose to be
fixed later
This commit is contained in:
Ivan Kylchik
2022-12-20 18:10:13 +01:00
committed by Space Team
parent 32a7633c06
commit bb401c39d9
26 changed files with 603 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
// WITH_STDLIB
// FILE: 1.kt
inline fun g(block: () -> Unit) {
block()
}
var x: String? = null
fun compute(): String {
try {
for (a in listOf("a")) {
g {
for (b in listOf("b")) {
return b
}
}
}
} finally {
x = "OK"
}
return "FAIL"
}
// FILE: 2.kt
fun box(): String {
val result = compute()
if (result == "FAIL") return result
return x ?: "FAIL"
}