Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
+17
@@ -0,0 +1,17 @@
|
||||
enum class Season {
|
||||
WINTER,
|
||||
SPRING,
|
||||
SUMMER,
|
||||
AUTUMN
|
||||
}
|
||||
|
||||
fun foo(x : Season, block : (Season) -> String) = block(x)
|
||||
|
||||
fun box() : String {
|
||||
return foo(Season.SPRING) {
|
||||
x -> when (x) {
|
||||
Season.SPRING -> "OK"
|
||||
else -> "fail"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user