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 ----
Comment #1 by henning — 2013-07-04T07:27:07Z
s/M/D
Comment #2 by henning — 2013-07-04T07:32:59Z
Comment #3 by github-bugzilla — 2013-07-04T10:10:10Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6505a8d8affb22d4d6c9c2da465e26f1d5648016 fix issue 10542 - implicitly generated class ctor doesnt inherit base class ctor attributes https://github.com/D-Programming-Language/dmd/commit/9af380a868c5e63bcfa1dc7d2b184d9764b680e0 Merge pull request #2297 from hpohl/10542 fix issue 10542 - implicitly generated class ctor doesn't inherit base class ctor attributes