www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6282] New: [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6282

           Summary: [CTFE] ICE when dereferencing a pointer to reference
                    type from 'in' of an AA
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com



Test case:

-----------------------------
static assert({
    auto a = [4:"1"];
    auto n = *(4 in a);
    return n; 
}() == "1");
-----------------------------
x.d(3): Error: CTFE internal error: illegal reference value [4:"1"][4]

Assertion failed: (isRefValueValid(newval)), function createRefValue, file
interpret.c, line 4978.
Abort trap
-----------------------------

The ICE also happens when the string "1" is replaced by any reference type
(array/aa).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 10 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6282


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



13:57:25 PDT ---
https://github.com/D-Programming-Language/dmd/commit/dc787833ee11ec6313503022b64e2a4aec61e7b6

https://github.com/D-Programming-Language/dmd/commit/501222f6d3d21b6b551851176cc6d5510022e737

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