blob: 5bfc291b253a69a69476145caba785c79e0a3094 [file]
annotation class ValueContainer
@ValueContainer
class Container(private var storage: String) {
fun assign(value: String) {
storage = value
}
fun assign(container: Container) {
storage = container.storage
}
operator fun plus(value: String): Container {
return Container(storage + value)
}
}
class Foo {
val property = Container("foo")
fun test() {
<expr>this.property</expr> += "bar"
}
}