Use generic invokeFunction() instead of ad-hoc one for in-range conditions in when
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fun Int.contains(i : Int) = true
|
||||
|
||||
fun box(): String {
|
||||
when (1) {
|
||||
in 2 -> return "OK"
|
||||
else -> return "fail"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user