voddan
08/30/2016, 11:07 AMinvoke
for that:
object label {
infix fun inside(box: Box) {}
}
class Box {
var background = 0
}
fun box(block: Box.() -> Unit) = Box()
val red = 100
fun main(args: Array<String>) {
label inside box {
background = red
}
}