[Issue 12544] New: Differences in ubyte/char enum printing

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 8 03:24:25 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12544

           Summary: Differences in ubyte/char enum printing
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2014-04-08 03:24:22 PDT ---
I am not sure if this is a bug, a regression, or it's working as designed.
Currently this code shows a difference in the outputs that perhaps should not
exist:


void main() {
   import std.stdio;
   enum E1 : ubyte { A='a' }
   E1[10] v1;
   writeln(v1);
   enum E2 : char { A='a' }
   E2[10] v2;
   writeln(v2);
   writefln("%-(%c%)", v2);
}



DMD 2.066alpha output:

[A, A, A, A, A, A, A, A, A, A]
aaaaaaaaaa
aaaaaaaaaa


Expected output:

[A, A, A, A, A, A, A, A, A, A]
[A, A, A, A, A, A, A, A, A, A]
aaaaaaaaaa

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list