Skip to content

Commit fd7e1f5

Browse files
authored
[spec/legacy] Add old alias syntax and postblit (#3721)
* [spec/legacy] Add old alias syntax and postblit * Add note about not using old alias declarations
1 parent ce6d37e commit fd7e1f5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

spec/declaration.dd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ auto c = new C(); // c is a handle to an instance of class C
244244

245245
$(H2 $(LNAME2 alias, Alias Declarations))
246246

247+
$(NOTE New code should use the *AliasAssignments* form only.)
248+
247249
$(GRAMMAR
248250
$(GNAME AliasDeclaration):
249251
$(D alias) $(GLINK StorageClasses)$(OPT) $(GLINK2 type, BasicType) $(GLINK2 type, TypeSuffixes)$(OPT) $(GLINK Identifiers) $(D ;)

spec/legacy.dd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ $(COMMENT
1414
)
1515

1616
$(TABLE2 Legacy Features,
17-
$(THEAD Feature)
18-
$(TROW $(RELATIVE_LINK2 body, `body` keyword), usage of identifier $(TT body) as a keyword is obsolete - use $(TT do) instead)
17+
$(THEAD Feature, Summary)
18+
$(TROW $(RELATIVE_LINK2 body, `body` keyword), $(D body) after a contract statement -
19+
use $(D do) instead)
20+
$(TROW `alias` target first syntax, use `alias name = target` instead.)
21+
$(TROW Struct/union postblit, use a $(DDSUBLINK spec/struct, struct-copy-constructor,
22+
copy constructor) instead.)
1923
)
2024

2125
$(H2 $(LNAME2 body, `body` keyword))

0 commit comments

Comments
 (0)