[Issue 9273] DMD Segfaulting with templated ctors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 8 23:18:25 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9273


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice


--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2013-01-08 23:18:23 PST ---
A simplified test case:
---
template CtorMixin() {
    this(T)() {}
}
class B {
    mixin CtorMixin!();
}
class C : B {
    this()() {}
}
void main() {
    auto c = new C();
}
---

(In reply to comment #0)
> This segfaults dmd, it's a dustmite reduction the whole code compiled under
> 2.060 so I guess it's a regression.

I think it is an accepts-invalid code in 2.060 and earlier.

In class NBTFile, implicitly generated default constructor will try to call
super class default constructor. But, in its super class TAG_Compound, template
constructor - which mixed in by _Base_TAG - requires explicit template
parameter to call. Therefore, the generating an implicit constructor in NBTFile
and whole compilation should fail.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list