digitalmars.D.bugs - [Issue 21531] New: dtoh: Forward-referencing issue wrt. globals of
- d-bugmail puremagic.com (31/31) Jan 09 2021 https://issues.dlang.org/show_bug.cgi?id=21531
https://issues.dlang.org/show_bug.cgi?id=21531 Issue ID: 21531 Summary: dtoh: Forward-referencing issue wrt. globals of custom types Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: kinke gmx.net In current frontend.h, we have: ``` [...] struct Global; [...] extern Global global; struct Loc { [...] const char* toChars(bool showColumns = global.params.showColumns, uint8_t messageStyle = static_cast<uint8_t>(global.params.messageStyle)) const; [...] }; ``` The `Global` struct declaration follows later but is required before `Loc::toChars()` and its default parameter values. --
Jan 09 2021