[Issue 8624] New: CTFE: 0x6161636772 == 0x4161636772

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 5 19:17:19 PDT 2012


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

           Summary: CTFE: 0x6161636772 == 0x4161636772
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ellery-newcomer at utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2012-09-05 19:17:47 PDT ---
dmd 2.060 x64 linux.

code:

int generateHashAndValueArrays()
{
  import std.string;
  assert(H("a") != H("A"), xformat("%x == %x",  H("a"), H("A")));
  return 1;
}

enum s = (generateHashAndValueArrays());

ulong H(string str)
{
    if(str[0] == 'a') return 0x6161636772;
    return 0x4161636772;
}


fireworks:

HtmlEntities.d(4): Error: ['6','1','6','1','6','3','6','7','7','2','
','=','=',' ','4','1','6','1','6','3','6','7','7','2'][0LU..24LU]

ehh,

HtmlEntities.d(4): Error: "6161636772 == 4161636772"

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


More information about the Digitalmars-d-bugs mailing list