Bug 2461 – Duplicate typedef (with different initializer) in module has wrong value
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-11-18T23:31:00Z
Last change time
2015-06-09T01:20:25Z
Keywords
wrong-code
Assigned to
nobody
Creator
rosscanning2007
Comments
Comment #0 by rosscanning2007 — 2008-11-18T23:31:22Z
The code below produces the output
555
555
when it should be
555
666
import std.stdio;
void f1() {
typedef int MyInt = 555;
MyInt x;
writefln(x);
}
void f2() {
typedef int MyInt = 666;
MyInt x;
writefln(x);
}
void main() {
f1();
f2();
}
Comment #1 by smjg — 2008-11-19T18:10:30Z
Please remember to assign keywords to bug reports. To everybody reading this: Please look through issues you've reported and check for missing keywords.
Comment #2 by andrej.mitrovich — 2012-12-01T16:46:46Z