Implement "Merge when" intention
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
when (n) {
|
||||
1 -> {
|
||||
res = "one"
|
||||
println("A")
|
||||
}
|
||||
2 -> {
|
||||
res = "two"
|
||||
println("B")
|
||||
}
|
||||
else -> {
|
||||
res = "unknown"
|
||||
println("C")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user