Bug 7588 – Segfault with alias this and function templates

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-25T10:31:00Z
Last change time
2012-02-25T18:44:07Z
Keywords
ice
Assigned to
nobody
Creator
hoganmeier

Comments

Comment #0 by hoganmeier — 2012-02-25T10:31:43Z
struct S { int t(A...)(A a) { return 0; } alias t this; } int main() { S s; return s; } $ gdb --args dmd test.d Program received signal SIGSEGV, Segmentation fault. 0x00000000004caee3 in TypeStruct::implicitConvTo(Type*) () (gdb) bt #0 0x00000000004caee3 in TypeStruct::implicitConvTo(Type*) () #1 0x000000000040c527 in Expression::implicitConvTo(Type*) () #2 0x000000000040c2fd in Expression::implicitCastTo(Scope*, Type*) () #3 0x00000000004f3f0b in ReturnStatement::semantic(Scope*) () #4 0x00000000004ec6a2 in CompoundStatement::semantic(Scope*) () #5 0x000000000048defc in FuncDeclaration::semantic3(Scope*) () #6 0x00000000004ba294 in Module::semantic3() () #7 0x00000000004b83b2 in main ()
Comment #1 by yebblies — 2012-02-25T18:39:20Z
Is this the same as issue 7580?
Comment #2 by k.hara.pg — 2012-02-25T18:44:07Z
*** This issue has been marked as a duplicate of issue 7580 ***