I did not hit this bug in the wild so I'm marking it as only a minor issue, but found this when testing https://github.com/dlang/dmd/pull/12252:
```
pragma(mangle, getFoo())
string getFoo()
{
pragma(msg, getFoo.mangleof);
return "foo";
}
pragma(msg, getFoo.mangleof);
```
Output:
> _D9onlineapp6getFooFZAya
> foo
It should raise a forward reference error, but instead a premature .mangleof is printed.
Comment #1 by robert.schadek — 2024-12-13T19:15:02Z