Hullaballoonatic
10/06/2018, 10:23 PMwhen
for only 2 cases instead of `if`/`else`?Dominaezzz
10/06/2018, 10:29 PMwhen {
x == 3 -> ....
y < 7 -> .....
}
then it doesn't matter, they'll probably compile to the same thing.
If you using values as the cases like,
when(x) {
1 -> ...
2 -> ...
}
you'll have to look at the byte code.Dominaezzz
10/06/2018, 10:30 PMkarelpeeters
10/07/2018, 12:47 PMTools > Show Kotlin bytecode > Decompile
is you friend!