[Issue 1217] New: Dollar ($) seen as non-constant expression in non-char[] array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 6 14:07:39 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1217
Summary: Dollar ($) seen as non-constant expression in non-char[]
array
Product: D
Version: 1.014
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: reiner.pope at gmail.com
The following code fails to compile:
const ulong[] A = ([1LU])[0..$];
with error message
slice.d(1): Error: non-constant expression [1LU][0u..__dollar]
However, the following similar code *does* compile:
const char[] A = "a"[0..$];
--
More information about the Digitalmars-d-bugs
mailing list