[Issue 21531] New: dtoh: Forward-referencing issue wrt. globals of custom types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 9 16:38:24 UTC 2021
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 at puremagic.com
Reporter: kinke at 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.
--
More information about the Digitalmars-d-bugs
mailing list