Possible Duplicate:
What is the motivation for Scala assignment evaluating to Unit rather than the value assigned?
Is there a reason why assignments in scala evaluate to Unit?
var s:String = null
s = "hello" // works
s += " world"
(s = "hello") += " world" // dramatic problem
or is there something magic with the brackets?