[Issue 2461] New: Duplicate typedef (with different initializer) in module has wrong value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 18 21:31:23 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2461

           Summary: Duplicate typedef (with different initializer) in module
                    has wrong value
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: rosscanning2007 at gmail.com


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();
}


-- 



More information about the Digitalmars-d-bugs mailing list