D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7429 - Cannot append a struct type to itself even if an opOpAssign(string op : "~") is defined.
Summary: Cannot append a struct type to itself even if an opOpAssign(string op : "~") ...
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 blocker
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 08:47 UTC by Gor Gyolchanyan
Modified: 2012-02-10 21:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Gor Gyolchanyan 2012-02-03 08:47:53 UTC
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 Brad Roberts 2012-02-03 23:24:40 UTC
When reporting bugs, please include a complete, preferably minimal, example.
Comment 2 yebblies 2012-02-10 21:56:34 UTC
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;
}