// expected: '+=' is not allowed for text concatenation // // The '+=' half of the same rule. Legacy rewrites `+=` into a concat-move for // the stdlib and refuses it in user code (loader's CheckPlusOnText, AssignStmt // case); stage4 had no such check at all and concatenated, so `s += b` on text // compiled here and was rejected there. // // The operand is []byte and the operator is '+=' rather than '+', which is the // only thing that distinguishes this fixture from reject_plus_text. package main func main() { // Termination first: a batch program must still be stoppable, and the entry // rule fires before the restriction under test, so without this the fixture // reports the missing shutdown arm instead of the '+' it exists to reject. select { case <-shutdown: return default: } a := []byte("x") b := []byte("y") s := a s += b println(s) }