Skip to content

Commit 008eff7

Browse files
authored
Update attribute.dd (#3717)
a) correct type anscestor -> ancestor b) example for scope attribute on static variable didn't include 'scope'
1 parent 682233c commit 008eff7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/attribute.dd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ $(H3 $(LNAME2 package, $(D package) Attribute))
462462

463463
$(P $(D package) may have an optional parameter in the form of a dot-separated identifier
464464
list which is resolved as the qualified package name. The package must be either the module's
465-
parent package or one of its anscestors. If this parameter is present, the symbol
465+
parent package or one of its ancestors. If this parameter is present, the symbol
466466
will be visible in the specified package and all of its descendants.
467467
)
468468

@@ -742,10 +742,10 @@ scope int* x; // scope ignored, global variable
742742

743743
void main()
744744
{
745-
static int* x; // scope ignored, global variable
746-
scope float y; // scope ignored, no indirections
747-
scope int[2] z; // scope ignored, static array is value type
748-
scope int[] w; // scope dynamic array
745+
// scope static int* x; // cannot be both scope and static
746+
scope float y; // scope ignored, no indirections
747+
scope int[2] z; // scope ignored, static array is value type
748+
scope int[] w; // scope dynamic array
749749
}
750750
---
751751
)

0 commit comments

Comments
 (0)