Bug 8246 – tuple fields pollute the linker namespace
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-14T12:10:00Z
Last change time
2015-02-18T03:39:43Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2012-06-14T12:10:44Z
DMD 2.059:
template TypeTuple(T...){ alias T TypeTuple; }
TypeTuple!int x;
int _x_field_0;
static assert(x[0].mangleof != _x_field_0.mangleof); // fail
The static assertion should pass.
(if the assertion is commented out, the code generates a linker error.)
The compiler must use a reserved identifier, for example
__tuple_x_field_0 instead of _x_field_0