[Issue 6526] New: Disambiguate mangling of AA literals
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Aug 18 09:23:06 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6526
           Summary: Disambiguate mangling of AA literals
           Product: D
           Version: 2.040
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: sean at invisibleduck.org
--- Comment #0 from Sean Kelly <sean at invisibleduck.org> 2011-08-18 09:23:05 PDT ---
The function:
   fn!([1:2, 3:4])();
is mangled as:
   _D8demangle21__T2fnVHiiA2i1i2i3i4Z2fnFZv
The pertinent part being the way associative arrays are mangled:
   HiiA2i1i2i3i4
The type is "Hii", so an AA of int->int.  But then the value is "A2i1i2i3i4",
which taken by itself suggests an array literal, not an AA literal.  This is
the only instance that I've encountered where the determined type has to be
communicated to the value parser so it can demangle things correctly (since it
would be otherwise treated as a plain old array literal and represented as
"[1,2]").  It would be better if the representation for this AA were:
   HiiH2i1i2i3i4
-- 
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