← Back to index
|
Original Bugzilla link
Bug 15756 – reading wrong address for alias in nested struct instance
Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-04T14:09:19Z
Last change time
2020-03-21T03:56:40Z
Assigned to
No Owner
Creator
John Colvin
Comments
Comment #0
by john.loughran.colvin — 2016-03-04T14:09:19Z
void main() { import std.stdio; long a = 4; writeln(a); // 4 writeln(&a); // 7FBFE6BAA0 struct Blah { alias b = a; } Blah blah; writeln(Blah.b); // 4 writeln(&(Blah.b)); // 7FBFE6BAA0 writeln(blah.b); // 1075983360 writeln(&(blah.b)); // 7FBFE6BAA8 }