Bug 2595 – template ctors crash compiler

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-01-20T08:38:00Z
Last change time
2015-06-09T01:21:00Z
Assigned to
bugzilla
Creator
silvioricardoc

Comments

Comment #0 by silvioricardoc — 2009-01-20T08:38:08Z
Compiler segfaults when processing the following template if it was mixed in a struct. It doesn't if the mixin happened inside a class. It complains that Templ.this(int) is not a ctor (and that, hence, you can't forward to this(double) from there) before crashing. template Templ () { this(int i) { this(0.0); } this(double d) { } } class C { mixin Templ; } // OK struct S { mixin Templ; } // Crashes in Templ void main() { }
Comment #1 by bugzilla — 2009-04-01T13:52:34Z
Fixed DMD 2.027