Bug 6282 – [CTFE] ICE when dereferencing a pointer to reference type from 'in' of an AA

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-07-10T12:26:00Z
Last change time
2011-07-22T13:57:25Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2011-07-10T12:26:29Z
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).
Comment #1 by bugzilla — 2011-07-22T13:57:25Z