When I write:
num = 3
switch (num){
case num < 2:
Log.d("int", "3");
case num > 2:
Log.d("int", "2");
case num > 0 :
Log.d("int", "1");
case num > 40:
Log.d("int", "10");
}
This will print case 2 and case 3.
I want to do the same in kotlin without using multiple if/else statements in situations like this. When{} doesn't help me since as AFAIK it has a mandatory break when we enter case and it doesn't go further through cases. Does anyone know nice solution for this?