Take control flow into account for checking fall-through switch branches
#KT-16133 Fixed
This commit is contained in:
committed by
Simon Ogorodnik
parent
31478f8efa
commit
3002639fd7
@@ -0,0 +1,12 @@
|
||||
fun foo(i: Int, j: Int): String {
|
||||
when (i) {
|
||||
0 -> {
|
||||
if (j > 0) {
|
||||
return "1"
|
||||
}
|
||||
return "2"
|
||||
}
|
||||
1 -> return "2"
|
||||
else -> return "3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user