[Issue 1177] New: $ no longer works inside CTFE functions.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 23 03:51:30 PDT 2007


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

           Summary: $ no longer works inside CTFE functions.
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au


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() {}


-- 



More information about the Digitalmars-d-bugs mailing list