JVM KT-47365 add box test
This commit is contained in:
committed by
teamcityserver
parent
7535f142c0
commit
c26d71c4ef
+20
@@ -0,0 +1,20 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
enum class EType {
|
||||
A
|
||||
}
|
||||
|
||||
class Wrapper(var t: EType?)
|
||||
|
||||
fun box(): String {
|
||||
val l = listOf(Wrapper(EType.A), Wrapper(null))
|
||||
|
||||
val ll = l.map {
|
||||
when (it.t) {
|
||||
EType.A -> "O"
|
||||
null -> "K"
|
||||
}
|
||||
}
|
||||
|
||||
return ll[0] + ll[1]
|
||||
}
|
||||
Reference in New Issue
Block a user