D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6839 - documentation for opAssign incorrect
Summary: documentation for opAssign incorrect
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: spec
Depends on:
Blocks:
 
Reported: 2011-10-22 10:10 UTC by Sean Silva
Modified: 2012-01-21 00:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Sean Silva 2011-10-22 10:10:44 UTC
The documentation about opAssign seems be incorrect:
http://d-programming-language.org/struct.html

It says:

> Struct assignment t=s is defined to be semantically equivalent to:
>   t = S.opAssign(s);

which I think should be `t.opAssign(s)`.

also, just below, the signature is stated as `S* opAssign(S s)`. According to this post on the newsgroup <http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.learn&artnum=30203>, the correct signature should be `void opAssign(ref const S rhs)`.