Join Slack
Communities
Powered by
What's the best way to have duplicate branches in ...
# getting-started
d
deepanshu
01/12/2017, 11:59 AM
What's the best way to have duplicate branches in a
when
statement? I have a
when
statement on an enum and want to do something like:
Copy code
val myEnum: MyEnum? = ... return when (myEnum) { A, B, C -> 1 D, E -> 2 null -> 3
Open in Slack
Previous
Next