Immutable

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 23 08:04:04 PDT 2017


On 06/23/2017 04:29 PM, Adam D. Ruppe wrote:
> try `new immutable AppendChatCommand` instead of just `new`.
> 
> If it complains that it cannot call the mutable constructor, go to the 
> class definition and add `pure` to the constructor. Should take care of 
> that error.

With a `pure` constructor, just `new` should work, too.


More information about the Digitalmars-d-learn mailing list