KT-1892: initializers for extension properties
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
val Int.ext : () -> Int = { 5 }
|
||||
val Long.ext : Long = 4.ext().toLong() //(c.kt:4)
|
||||
val y : Long = 10.toLong().ext
|
||||
|
||||
fun box() : String = if (y == 5.toLong()) "OK" else "fail"
|
||||
Reference in New Issue
Block a user