Skip to content

Commit 2be77bb

Browse files
authored
[spec] Tweak AliasThis docs (#3575)
Fix old class links after #3498. A union can have alias this. Tweak wording.
1 parent 81cf49a commit 2be77bb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/struct.dd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ $(H3 $(LNAME2 struct-members, Struct Members))
105105
$(LI $(RELATIVE_LINK2 Invariant, Invariants))
106106
$(LI $(DDLINK spec/operatoroverloading, Operator Overloading, Operator Overloading))
107107
)
108-
$(LI $(DDSUBLINK spec/class, alias-this, Alias This))
108+
$(LI $(RELATIVE_LINK2 alias-this, Alias This))
109109
$(LI Other declarations (see $(GLINK2 module, DeclDef)))
110110
)
111111
)
@@ -133,7 +133,7 @@ $(H3 $(LNAME2 union-members, Union Members))
133133
$(LI $(RELATIVE_LINK2 UnionConstructor, Constructors))
134134
$(LI $(DDLINK spec/operatoroverloading, Operator Overloading, Operator Overloading))
135135
)
136-
$(LI $(DDSUBLINK spec/class, alias-this, Alias This))
136+
$(LI $(RELATIVE_LINK2 alias-this, Alias This))
137137
$(LI Other declarations (see $(GLINK2 module, DeclDef)))
138138
)
139139
)
@@ -2017,7 +2017,7 @@ $(GNAME AliasThis):
20172017
The $(I Identifier) names that member.
20182018
)
20192019

2020-
$(P A struct can be implicitly converted to the $(I AliasThis)
2020+
$(P A struct or union instance can be implicitly converted to the $(I AliasThis)
20212021
member.
20222022
)
20232023

@@ -2079,7 +2079,7 @@ void main()
20792079
)
20802080

20812081
$(P If the $(I Identifier) refers to a property member
2082-
function with no parameters, conversions and undefined
2082+
function with no parameters then conversions and undefined
20832083
lookups are forwarded to the return value of the function.
20842084
)
20852085

@@ -2106,11 +2106,11 @@ void main()
21062106
)
21072107

21082108
$(P If a struct declaration defines an $(D opCmp) or $(D opEquals)
2109-
method, it will take precedence to that of the aliased this member. Note
2109+
method, it will take precedence to that of the *AliasThis* member. Note
21102110
that, unlike an $(D opCmp) method, an $(D opEquals) method is implicitly
2111-
defined for a $(D struct) declaration if a user defined one isn't provided;
2112-
this means that if the aliased this member $(D opEquals) is preferred it
2113-
should be explicitly defined:
2111+
defined for a $(D struct) declaration if a user-defined one isn't provided.
2112+
This means that if the *AliasThis* member's $(D opEquals) should be used, it
2113+
must be explicitly defined:
21142114
)
21152115
$(SPEC_RUNNABLE_EXAMPLE_RUN
21162116
---
@@ -2179,7 +2179,7 @@ void main()
21792179
$(P $(GLINK2 attribute, Attribute)s are ignored for $(D AliasThis).
21802180
)
21812181

2182-
$(P A struct may have a single $(I AliasThis) member.)
2182+
$(P A struct/union may only have a single $(I AliasThis) member.)
21832183

21842184

21852185

0 commit comments

Comments
 (0)