[Issue 5207] Immutability is broken in constructors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 12 08:26:01 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5207
Lars T. Kyllingstad <bugzilla at kyllingen.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Immutability is broken in |Immutability is broken in
|module constructor |constructors
--- Comment #1 from Lars T. Kyllingstad <bugzilla at kyllingen.net> 2010-11-12 08:24:54 PST ---
This actually holds for all constructors, not just module constructors:
struct S
{
immutable int i;
this(int k)
{
assert (i == 0);
i = k;
assert (i == k);
}
}
void main()
{
auto s = S(1);
}
--
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