[Issue 2595] New: template ctors crash compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 20 06:38:09 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2595
Summary: template ctors crash compiler
Product: D
Version: 2.023
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: silvioricardoc at gmail.com
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() { }
--
More information about the Digitalmars-d-bugs
mailing list