[Issue 8276] New: [CTFE] ICE when reading variable from nested function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 20 23:43:23 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8276
Summary: [CTFE] ICE when reading variable from nested function
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2012-06-20 23:45:45 PDT ---
void blah(int n)
{
const int X = 4 + n; // ICE
// const int X = 4; // ok
// int X = 4; // ICE
int far() { return X; }
static assert(far());
}
dmd: interpret.c:2019: Expression* getVarExp(Loc, InterState*, Declaration*,
CtfeGoal): Assertion `0' failed.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list