This code: module properties; struct PropertyList { invariant() { assert(1); } this(this) { _props = []; } string[] _props; } gives compiler error: Error: __result = this is not mutable Error: __result = this is not an lvalue Without invariant all works good.
It seems that I cannot set proper DMD version - It was on DMD 2.0.51, Linux x86
(In reply to comment #1) > It seems that I cannot set proper DMD version - It was on DMD 2.0.51, Linux x86 You should just set version = D2 (the exact release number is useless information). Same issue as bug 3273. *** This issue has been marked as a duplicate of issue 3273 ***