Consider:
-----
struct S() {
int test() {
pragma(msg, test.mangleof);
return 3;
}
}
S!() s;
-----
This should give an error, because attributes that affect mangling are not known until the semantic analysis is complete.
Comment #1 by dlang-bot — 2020-03-24T08:56:42Z
@WalterBright created dlang/dmd pull request #10961 "Fix Issue 20696 - Should error when retrieving mangling while the typ…" fixing this issue:
- Fix Issue 20696 - Should error when retrieving mangling while the type is not yet final
https://github.com/dlang/dmd/pull/10961
Comment #2 by pro.mathias.lang — 2020-03-24T10:19:31Z
15431 is related, but a different problem requiring a different solution.
Comment #4 by dlang-bot — 2020-03-28T14:22:58Z
dlang/dmd pull request #10961 "Fix Issue 20696 - Should error when retrieving mangling while the typ…" was merged into master:
- c4e6520f862b80dbb3756c05c29a4fcd25aa7d5d by Walter Bright:
Fix Issue 20696 - Should error when retrieving mangling while the type is not yet final
https://github.com/dlang/dmd/pull/10961