JS: move expressions test to box tests
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package foo
|
||||
|
||||
fun test():Any {
|
||||
val a: Any = "OK"
|
||||
val f: Any =
|
||||
if (true) {
|
||||
when {
|
||||
false -> "1"
|
||||
((a as? String)?.size ?: 0 > 0) -> a
|
||||
else -> "2"
|
||||
}
|
||||
}
|
||||
else {
|
||||
"3"
|
||||
|
||||
}
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
fun box(): Any {
|
||||
var result = test()
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user