We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c022f8d commit 0723b37Copy full SHA for 0723b37
spec/module.dd
@@ -489,17 +489,18 @@ $(H2 $(LNAME2 module_scope_operators, Module Scope Operator))
489
$(P A leading dot (`.`) causes the
490
identifier to be looked up in the module scope.)
491
492
+$(SPEC_RUNNABLE_EXAMPLE_RUN
493
---------
-int x;
494
+const int x = 1;
495
-int foo(int x)
496
+void main()
497
{
- if (y)
498
- return x; // returns foo.x, not global x
499
- else
500
- return .x; // returns global x
+ int x = 5;
+ assert(x == 5); // main.x, not global x
+ assert(.x == 1); // global x
501
}
502
503
+)
504
505
506
$(H2 $(LNAME2 staticorder, Static Construction and Destruction))
0 commit comments