[Issue 12777] const/immutable member function violating its const-ness - confusing error message
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed May 21 01:32:52 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12777
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
CC| |bearophile_hugs at eml.cc
--- Comment #3 from bearophile_hugs at eml.cc ---
What error message do you suggest? Perhaps something like this?
test.d(3): Error: const methods (like 'S.fun') cannot modify instance members
(like 'S.v'), only constructors can initialize them
test.d(4): Error: immutable methods (like 'S.gun') cannot modify instance
members (like 'S.v'), only constructors can initialize them
--
More information about the Digitalmars-d-bugs
mailing list