http://d.puremagic.com/issues/show_bug.cgi?id=8170
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Kenji Hara <[email protected]> 2013-09-22 10:51:54 PDT --- (In reply to comment #0) > The code below throws an assert error: > > void main() > { > struct S > { > void* ptr = null; > > S opAssign(int) > { > assert (ptr is null); > return this; > } > } > > S[int] s; > s[0] = 0; > } > > In an associative array, ptr is not initialized to null before opAssign is > called. When you call opAssign directly, it would throw RangeError. S[int] s; s[0].opAssign(0); So the OP code should also throw RangeError. *** This issue has been marked as a duplicate of issue 6178 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
