Bug 1177 – $ no longer works inside CTFE functions.
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-04-23T05:51:00Z
Last change time
2014-02-16T15:26:22Z
Assigned to
bugzilla
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2007-04-23T05:51:29Z
bug.d(5): Error: variable __dollar is used before initialization
bug.d(8): Error: cannot evaluate b() at compile time
Worked in DMD 1.012.
-------------
bool b()
{
char [] a = "abc";
return (a[$-1]=='b');
}
const c = b();
void main() {}