Jiri Bruchanov
11/28/2019, 6:10 PMval x = fun Int.() { this.toString() }
1.x()
can be 'x' defined as anonymous/named extension property ?
so I could have
1.x
?Mike
11/28/2019, 6:16 PMfun Any.x() { this.toString() }
Jiri Bruchanov
11/28/2019, 6:20 PMfun test() {
val x = fun Int.() { this.toString() }
1.x()
val y = //?
1.y
}
class Test {
val Int.y get() = toString()
fun test() {
val x = fun Int.() { this.toString() }
1.x()
1.y
}
}
But looking if there is away to define it in the scope of the 'test' functionShawn
11/28/2019, 6:23 PMJiri Bruchanov
11/28/2019, 6:24 PM