Add several new SMAP tests
Some of them are still failing and suppose to be fixed later
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user