more forward declarations
This commit is contained in:
8
specs.md
8
specs.md
@@ -951,9 +951,9 @@ main :: () {
|
||||
// void return, no -> annotation
|
||||
}
|
||||
|
||||
// Bare-block shorthand (equivalent to no-arg void function):
|
||||
main :: {
|
||||
// same as main :: () { ... }
|
||||
// No-arg void function:
|
||||
main :: () {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1468,7 +1468,7 @@ compute :: (x: s32) -> s32 {
|
||||
Bare blocks can be used as statements to introduce a new lexical scope. Variables declared inside a scope block are local to that block. No trailing `;` is required.
|
||||
|
||||
```sx
|
||||
main :: {
|
||||
main :: () {
|
||||
x := 42;
|
||||
{
|
||||
x := 6; // shadows outer x
|
||||
|
||||
Reference in New Issue
Block a user