blob: f60f7f2ab57b6feac29c1af63db70b879695fbed [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(foo: Foo) {
<expr>foo.property</expr> += "bar"
}