[Issue 6906] Cannot assign value into associative array if contains opAssign
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 8 23:00:06 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6906
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
--- Comment #3 from Don <clugdbug at yahoo.com.au> 2011-11-08 22:59:29 PST ---
(In reply to comment #2)
> Can I then say you aren't able to define opAssign for a struct and have it work
> for associative arrays:
>
> /tmp$ ./test
> Segmentation fault
That's definitely a problem, but I don't think it has anything to do with AAs.
This also creates a stack overflow:
void main() {
S s;
S t;
t = s;
}
struct S {
void opAssign(S s) {
this = s;
}
}
Obviously it's changing 'this = XXX' into 'this.opAssign(XXX)'.
--
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