November 23, 2011 [Issue 6995] New: [CTFE] can't interpret static template method | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6995 Summary: [CTFE] can't interpret static template method Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: dawg@dawgfoto.de --- Comment #0 from dawg@dawgfoto.de 2011-11-23 04:48:56 PST --- struct Foo { static size_t index(size_t v)() { return v; } } enum s = Foo.index!(0)(); ---- CTFE internal error: cannot evaluate (Foo , index)() at compile time ---- In CallExp::semantic around line 7513: if (!f->needThis()) { VarExp *ve = new VarExp(loc, f); e1 = new CommaExp(loc, ue->e1, ve); e1->type = f->type; } a comma expression is created with ue->e1 being a TypeExp. The CTFE interpretation can't handle this case in CallExp::interpret. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
December 18, 2011 [Issue 6995] [CTFE] can't interpret static template method | ||||
---|---|---|---|---|
| ||||
Posted in reply to dawg@dawgfoto.de | http://d.puremagic.com/issues/show_bug.cgi?id=6995 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2011-12-17 20:50:36 PST --- https://github.com/D-Programming-Language/dmd/commit/5011154cdb4e9d48f4a866b18defb2b03f93a2b2 https://github.com/D-Programming-Language/dmd/commit/fdca0001179a43a188f3c003bf2b50757e250403 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation