Immutable

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 23 07:29:40 PDT 2017


On Friday, 23 June 2017 at 14:25:48 UTC, harakim wrote:
> immutable(AppendChatCommand) command = new 
> AppendChatCommand(type, text);

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.


More information about the Digitalmars-d-learn mailing list