Re: const/immutable violation?

2011-05-01 Thread Jason House
Ashish Myles Wrote: foo2 = foo; // allowed immutable RHS ??? Allowing this is a bug. File it in bugzilla. Unfortunately, lazy objects mess up the expected const correctness of Object. Even if they are logically const, lazy objects can't always be passed as const.

const/immutable violation?

2011-04-30 Thread Ashish Myles
I saw examples in the D Programming Language book (Page 256) where opAssign() took a ref argument instead of a const ref. So I figured I would test it out and see if the compiler complains if I try to assign a const or immutable struct to another one. import std.stdio; struct Foo { auto