Am Fri, 17 Oct 2014 14:42:53 +0200 schrieb Marco Leise <[email protected]>:
> Am Fri, 17 Oct 2014 00:42:24 +0000 > schrieb "IgorStepanov" <[email protected]>: > > OK, I've run into the same problem and there is no line > number, just: > > Error: immutable method Lib.Sys.File.File.~this is not callable using a > mutable object > Error: mutable method Lib.Sys.File.File.~this is not callable using a > immutable object > > haha! I should start from scratch. Here is a reduced test case, that I wish I had before I tried to make 1000 lines of code work with immutable: struct B { ~this() { /* some cleanup */ } } struct C { immutable B b; } void main() { C(immutable B()); } That's pretty much it. You cannot use compose a mutable struct out of immutable ones with dtors. -- Marco
