mirror of
https://github.com/zap-proto/go.git
synced 2026-10-30 15:05:00 +00:00
A field may carry the name of its own type — `Child Child` is a natural schema — and in C++ the member then shadows the class inside the class body, so `Child Child() const;` is ill-formed. The qualified name says which is meant. Go has no such collision, which is why this only shows up on one side. Per-struct headers now also forward-declare the classes they name, not just their own, so declaration order is free there too. Two structs that point at each other still need -single: two headers cannot each be complete for the other, and the cycle compiles in one header. Both cases are checked by compiling, not by reading.