Bug 3205 – CTFE: $ cannot be used in lvalues

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Windows
Creation time
2009-07-23T23:55:00Z
Last change time
2014-04-18T09:12:05Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2009-07-23T23:55:20Z
int bar() { int [] x = [0, 1, 2]; x[x.length-1] = 5; // works x[$-1] = 5; // fails return 0; } int z = bar(); --- ctfe.d(6): Error: variable __dollar is used before initialization ctfe.d(10): Error: cannot evaluate bar() at compile time I have a patch for this, together with 2569 and 1948.
Comment #1 by clugdbug — 2009-07-24T02:20:31Z
Patch included in patch for bug#2569.
Comment #2 by bugzilla — 2009-09-03T13:27:36Z
Fixed dmd 1.047 and 2.032