$ cat z.d
const z = "hello";
const h = z[1..$];
$ dmd -c z.d
z.d(2): Error: non-constant expression "hello"[1u..__dollar]
Works with dmd2.
Tested with dmd 1.59 beta (can only select up to 1.057 in bugzilla).
Comment #1 by strtr — 2010-07-21T23:13:35Z
Just found this one in D1.062 Windows.
Workaround : use z.length iso $.
const A = [1,2,3];
const B = A[1..A.length];