Skip to content

Commit bb6e7c8

Browse files
authored
[spec] Add links to scope class variable (#3637)
1 parent e9e831d commit bb6e7c8

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

spec/class.dd

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ $(H3 $(LNAME2 class-instantiation, Class Instantiation))
482482
A a = new A(3);
483483
------
484484

485+
$(P A $(DDSUBLINK spec/attribute, scope-class-var, `scope` object) can be allocated on the stack.)
486+
485487
$(P The following steps happen:)
486488

487489
$(OL
@@ -700,8 +702,10 @@ $(GNAME Destructor):
700702
$(D ~ this ( )) $(GLINK2 function, MemberFunctionAttributes)$(OPT) $(GLINK2 function, FunctionBody)
701703
)
702704

703-
$(P The garbage collector calls the destructor function when the object
704-
is deleted. The syntax is:)
705+
$(P The destructor function is called when the object
706+
is deleted by the garbage collector, or when a
707+
$(DDSUBLINK spec/attribute, scope-class-var, `scope` object) goes out of scope.
708+
The syntax is:)
705709

706710
------
707711
class Foo
@@ -1022,7 +1026,8 @@ $(GNAME Invariant):
10221026

10231027

10241028
$(H2 $(LNAME2 auto, Scope Classes))
1025-
$(B Note): Scope classes have been $(DDSUBLINK deprecate, scope as a type constraint, recommended for deprecation).
1029+
$(NOTE Scope classes have been $(DDSUBLINK deprecate, scope as a type constraint, deprecated). See also
1030+
$(DDSUBLINK spec/attribute, scope-class-var, `scope` objects).)
10261031

10271032
$(P A scope class is a class with the $(D scope) attribute, as in:)
10281033

spec/expression.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2550,9 +2550,9 @@ $(GNAME ArgumentList):
25502550
$(GLINK AssignExpression) $(D ,) $(GSELF ArgumentList)
25512551
)
25522552

2553-
$(P $(I NewExpression)s are used to allocate memory on the
2553+
$(P $(I NewExpression)s allocate memory on the
25542554
$(DDLINK spec/garbage, Garbage Collection, garbage
2555-
collected) heap.
2555+
collected) heap by default.
25562556
)
25572557

25582558
$(P The `new` *Type* form constructs an instance of a type and default-initializes it.)

0 commit comments

Comments
 (0)