d78d4bc44c
#KT-1682 Fixed
20 lines
307 B
Kotlin
20 lines
307 B
Kotlin
trait Base {
|
|
fun foo(): Int
|
|
}
|
|
|
|
val Int.getter: Int
|
|
get() {
|
|
return object : Base {
|
|
override fun foo(): Int {
|
|
return this@getter
|
|
}
|
|
}.foo()
|
|
}
|
|
|
|
fun box(): String {
|
|
val i = 1
|
|
if (i.getter != 1) return "getter failed"
|
|
|
|
return "OK"
|
|
}
|