bamboo
01/10/2017, 10:43 PMdata class Data(var value: Int = 0)
fun main(args: Array<String>) {
val value = 33
println(Data().apply {
this.value = 42
value = 42 // ERROR: Val cannot be reassigned
})
}
Is this behaviour described somewhere? And is it as intended?