Bug 8456 – DMD crash with variadic base-class ctor and non-variadic subclass ctor
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2012-07-27T15:36:00Z
Last change time
2013-01-10T07:32:00Z
Assigned to
nobody
Creator
callumenator
Comments
Comment #0 by callumenator — 2012-07-27T15:36:30Z
The following reduced case causes dmd to crash on Windows 7, DMD v2.059
module crash;
class A
{
this(T...)(B root, T args)
{
}
}
class B : A
{
}
Normal compile using:
dmd crash.d
Giving B a variadic constructor:
class B : A
{
this(T...)(T args) { }
}
fixes the problem, but a non-variadic ctor does not help.
In case it is helpful, here is the Win crash report:
Problem signature:
Problem Event Name: APPCRASH
Application Name: dmd.exe
Application Version: 0.0.0.0
Application Timestamp: 00000000
Fault Module Name: dmd.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 0007fb07
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: c0d2
Additional Information 2: c0d2fd7c47233db608dcc0a8dfa7e295
Additional Information 3: 1f23
Additional Information 4: 1f2306dd978c4ee71ff52bd5c60c90af
Comment #1 by andrej.mitrovich — 2013-01-10T07:32:00Z
2.061+:
test.d(8): Error: constructor test.B.this no match for implicit super() call in implicitly generated constructor