Coerce any type to Number before unboxing
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
fun foo(x: Int) = x
|
||||
|
||||
fun bar(x: Comparable<Int>) = if (x is Int) foo(x) else 0
|
||||
|
||||
fun box() = if (bar(42) == 42) "OK" else "Fail"
|
||||
Reference in New Issue
Block a user