Bug 1153 – dmd assertion failure

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-04-16T10:40:00Z
Last change time
2014-02-16T15:21:55Z
Assigned to
bugzilla
Creator
davidl

Comments

Comment #0 by davidl — 2007-04-16T10:40:05Z
interface Foo { void work(); } template Wrapper(B, alias Func, int func) { alias typeof(&Func) FuncPtr; private static FuncPtr get_funcptr() { return func; } } int main(char[][] args) { auto x = new Wrapper!(Foo, Foo.work, cast(int)(Foo.classinfo.vtbl[0]))(); return 0; } Assertion failure: 'e1->type' on line 6377 in file 'expression.c' abnormal program termination
Comment #1 by thomas-dloop — 2007-04-23T12:57:15Z
The code you posted is invalid. Replace "template Wrapper" with "class Wrapper" or "struct Wrapper". Added to DStress as http://dstress.kuehne.cn/compile/c/classinfo_02_A.d http://dstress.kuehne.cn/compile/c/classinfo_02_B.d
Comment #2 by bugzilla — 2007-04-27T14:57:49Z
Fixed DMD 1.014