Skip to content

Commit c04166e

Browse files
authored
Restrict 'strongly-unique' predicate to prevent further bindings conflicts (#494)
Resolves #478
1 parent 67405f7 commit c04166e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

design/mvp/Explainer.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,9 @@ names that appear within the same scope.
24642464
To determine whether two names (defined as sequences of [Unicode Scalar
24652465
Values]) are **strongly-unique**:
24662466
* If one name is `l` and the other name is `[constructor]l` (for the same
2467-
`label` `l`), they are strongly-unique.
2467+
`label` `l`), they *are* strongly-unique.
2468+
* If one name is `l` and the other name is `[method]l.l` (for the same
2469+
`label` `l`), they *are not* strongly-unique.
24682470
* Otherwise:
24692471
* Lowercase all the `acronym`s (uppercase letters) in both names.
24702472
* Strip any `[...]` annotation prefix from both names.
@@ -2474,7 +2476,7 @@ Thus, the following names are strongly-unique:
24742476
* `foo`, `foo-bar`, `[constructor]foo`, `[method]foo.bar`, `[method]foo.baz`
24752477

24762478
but attempting to add *any* of the following names would be a validation error:
2477-
* `foo`, `foo-BAR`, `[constructor]foo-BAR`, `[async]foo`, `[method]foo.BAR`
2479+
* `foo`, `foo-BAR`, `[constructor]foo-BAR`, `[method]foo.foo`, `[async]foo`, `[method]foo.BAR`
24782480

24792481
Note that additional validation rules involving types apply to names with
24802482
annotations. For example, the validation rules for `[constructor]foo` require

0 commit comments

Comments
 (0)