// expected: '+' is not allowed for text concatenation // // '+' on text was accepted by stage4 and rejected by legacy, in every spelling // where BOTH operands were []byte (W29). Legacy's rule is loader's // CheckPlusOnText, which tests either operand for text; the stage4 check tested // only the LEFT operand and only for the string Basic, so `a + b` on two // []byte values compiled here and produced a concatenation, while // `"a" + "b"` was already refused. Two compilers disagreeing about which // programs exist is the one thing wood law does not allow. // // The rule is a main-module rule: a dependency package and the toolchain keep // '+' (legacy gates on Module.Main), which is why the same check is not applied // to imports. 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 + b println(s) }