KT-752 RangeTo intrinsic called with receiver
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace demo_range
|
||||
|
||||
fun Int?.rangeTo(other : Int?) : IntRange = this.sure().rangeTo(other.sure())
|
||||
|
||||
fun box() : String {
|
||||
val x : Int? = 10
|
||||
val y : Int? = 12
|
||||
|
||||
for (i in x..y)
|
||||
System.out?.println(i.inv())
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user