Bug 9439 – D1: CTFE ICE: calling member function after "incorrect this" error
Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2013-02-01T07:48:00Z
Last change time
2013-11-24T20:04:34Z
Keywords
CTFE, ice, pull
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2013-02-01T07:48:53Z
class Base {
void boo(alias F)() {
static assert(F());
}
}
class Derived : Base {
int foo() { return 1; }
void bug() {
boo!(foo)();
}
}
-----
xx.d(3): Error: this for foo needs to be type Derived not type xx.Base
dmd: interpret.c:4000: virtual Expression* CallExp::interpret(InterState*, CtfeGoal): Assertion `thisval && thisval->op == ((TOK)(TOKMAX+1))' failed.
CTFE should not be attempted after the error occurs.