[Issue 3944] Require immutable annotation for new fields of class inherited from immutable class
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 7 14:36:37 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3944
Tim Verweij <tjverweij at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tjverweij at gmail.com
--- Comment #1 from Tim Verweij <tjverweij at gmail.com> 2010-07-07 14:36:34 PDT ---
Here's another situation that produces the same error message:
class Foo
{
int x;
immutable void bar() { x = 1; }
}
Error: can only initialize const member x inside constructor
It should probably report something along the lines of "immutable member
function cannot modify member variables".
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list