Bug 7429 – Cannot append a struct type to itself even if an opOpAssign(string op : "~") is defined.
Status
RESOLVED
Resolution
WORKSFORME
Severity
blocker
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-03T08:47:00Z
Last change time
2012-02-10T21:56:34Z
Assigned to
nobody
Creator
gor
Comments
Comment #0 by gor — 2012-02-03T08:47:53Z
The error "Error: cannot append type Set to type Set" for a struct type Set, which has the operator overloaded:
ref Set opOpAssign(string op : "~")(in Set set_);
Comment #1 by braddr — 2012-02-03T23:24:40Z
When reporting bugs, please include a complete, preferably minimal, example.
Comment #2 by yebblies — 2012-02-10T21:56:34Z
Cannot reproduce with dmd 2.058 beta.
struct Set
{
ref Set opOpAssign(string op : "~")(in Set set_) { return this; }
}
void main()
{
Set s;
s ~= s;
}