[Issue 8660] Unclear semantics of array literals of char type, vs string literals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 14 08:42:47 PDT 2012


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


timon.gehr at gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timon.gehr at gmx.ch


--- Comment #1 from timon.gehr at gmx.ch 2012-09-14 08:42:57 PDT ---
I don't have a deep understanding of the DMD CTFE engine, but wouldn't it
suffice to do a conversion to a string literal if the type is immutable(char)[]
and to an array literal otherwise? This would only have to be done once
(recursively on the entire return value) as a final sanitizing step after the
CTFE execution has run to completion. This would make both lines illegal, as
you suggest.

-- 
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