immutable method not callable using argument types () - doesn't make sense

Lee Braiden leebraid at gmail.com
Thu Feb 7 00:20:43 PST 2013


On Thu, 07 Feb 2013 00:31:20 +0100, Timon Gehr wrote:
> A.d:22:9: error: receiver for member function 'dup' is unqualified, but
> 'immutable' is required
>      f = g.dup;
>          ^~~~~
> 
> Is this what you'd want?

Almost, it's definitely better, but what's wrong with:

	"immutable object method dup cannot be called on mutable object d"

? ;)


-- 
Lee


More information about the Digitalmars-d mailing list