Bug 10542 – implicitly generated class ctor doesnt inherit base class ctor attributes
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-04T07:26:00Z
Last change time
2013-07-04T10:10:21Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
henning
Comments
Comment #0 by henning — 2013-07-04T07:26:45Z
class B
{
this() nothrow pure @safe { }
}
class D : B
{
}
void test() nothrow pure @safe
{
new M;
}
----
main.d(12): Error: pure function 'main.test' cannot call impure function 'main.D.this'
main.d(12): Error: safe function 'main.test' cannot call system function 'main.D.this'
main.d(12): Error: constructor this is not nothrow
main.d(10): Error: function 'main.test' is nothrow yet may throw
----