https://issues.dlang.org/show_bug.cgi?id=22054
Issue ID: 22054
Summary: Referencing a fwd-declared field results in many error
messages
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```
class exception;
void main ()
{
assert(exception.what() == "Hello");
}
```
This results in:
```
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`opDot`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`opDispatch`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`at`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
what.d(1): Error: class `what.exception` is forward referenced when looking for
`what`
```
Tested with DMD 2.097.0
--