-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
specify that static and instance members cannot have the same name (#…
- Loading branch information
Showing
1 changed file
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Augmentations | ||
|
||
Author: [email protected], [email protected], [email protected] <br> | ||
Version: 1.30 (see [Changelog](#Changelog) at end) | ||
Version: 1.31 (see [Changelog](#Changelog) at end) | ||
|
||
Augmentations allow spreading your implementation across multiple locations, | ||
both within a single file and across multiple files. They can add new top-level | ||
|
@@ -1101,6 +1101,12 @@ introducing a lexical scope for the declaration’s contents. In the middle, eac | |
passes through the shared library declaration namespaces for the top-level | ||
instances themselves. | ||
|
||
It is a compile time error for both a static and instance member of the same | ||
name to be defined on the same type, even if they live in different lexical | ||
scopes. You cannot work around this restriction by moving the static member | ||
out to an augmentation, even though it would result in an unambiguous resolution | ||
for references to those members. | ||
|
||
## Syntax | ||
|
||
The grammar changes are fairly simple. The grammar is modified to allow an | ||
|
@@ -1387,6 +1393,11 @@ to the augmentation. | |
|
||
## Changelog | ||
|
||
### 1.31 | ||
|
||
* Specify that it is an error to have a static and instance member with the | ||
same name in the fully merged declaration. | ||
|
||
### 1.30 | ||
|
||
* Simplify extension type augmentations, don't allow them to contain the | ||
|