← Back to index
|
Original Bugzilla link
Bug 7158 – [CTFE] ICE(interpret.c) calling a class member using a dotvar expression
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-12-23T00:49:00Z
Last change time
2015-06-09T05:15:04Z
Assigned to
nobody
Creator
nilsbossung
Comments
Comment #0
by nilsbossung — 2011-12-23T00:49:33Z
--- class C { bool b() {return true;} } struct S { C c; } bool test() { S s = S(new C); return s.c.b; } static assert(test()); --- Gives "dmd: interpret.c:4643: virtual Expression* CallExp::interpret(InterState*, CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed." These variations don't give errors: --- bool test() { return S(new C).c.b; } bool test() { S s = S(new C); C c = s.c; return c.b; } ---
Comment #1
by bugzilla — 2011-12-24T15:10:16Z
https://github.com/D-Programming-Language/dmd/commit/15039d5284922ac673023da65827460972ba60b3
https://github.com/D-Programming-Language/dmd/commit/3c95d9e1308ba60312947400c5ac02d4f7c4c410