KT-723 optional boxing after call to .inc()
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fun Int?.inc() : Int { if (this != null) return this.inc() else throw NullPointerException() }
|
||||
|
||||
public fun box() : String {
|
||||
var i : Int? = 10
|
||||
val j = i++
|
||||
|
||||
return if(j==10 && 11 == i) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user