Re: Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-20 Thread arturg via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 16:00:56 UTC, Piotr Mitana wrote: Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from

Re: Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-20 Thread Eugene Wissner via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 16:00:56 UTC, Piotr Mitana wrote: Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from

Re: Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-20 Thread bauss via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 16:00:56 UTC, Piotr Mitana wrote: Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from

Base class' constructor is not implicitly inherited for immutable classes. A bug or a feature?

2017-07-19 Thread Piotr Mitana via Digitalmars-d-learn
Hello, I have this code: immutable class Base { this() {} } immutable class Derived : Base {} void main() { new immutable Derived(); } I'd like class Derived to automatically inherit the default constructor from Base. However, this is not the case: main.d(6): Error: class