Skip to content

Commit a04fbee

Browse files
committed
Doc tweaks
1 parent 47c1d89 commit a04fbee

File tree

1 file changed

+6
-3
lines changed
  • docs/docs/reference/other-new-features

1 file changed

+6
-3
lines changed

docs/docs/reference/other-new-features/export.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ An export clause has the same format as an import clause. Its general form is:
4747
```
4848
It consists of a qualifier expression `path`, which must be a stable identifier, followed by
4949
one or more selectors `sel_i` that identify what gets an alias. Selectors can be
50-
of one of three forms:
50+
of one of the following forms:
5151

5252
- A _simple selector_ `x` creates aliases for all eligible members of `path` that are named `x`.
5353
- A _renaming selector_ `x => y` creates aliases for all eligible members of `path` that are named `x`, but the alias is named `y` instead of `x`.
54-
- An _omitting selector_ `x => _` presents `x` from being aliased by a subsequent
54+
- An _omitting selector_ `x => _` prevents `x` from being aliased by a subsequent
5555
wildcard selector.
5656
- A _wildcard selector_ creates aliases for all eligible members of `path` except for
5757
those members that are named by a previous simple, renaming, or omitting selector.
@@ -64,6 +64,9 @@ A member is _eligible_ if all of the following holds:
6464
- it is an `implied` instance (or an old-style `implicit` value)
6565
if and only if the export is `implied`.
6666

67+
It is a compile-time error if a simple or renaming selector does not identify any eligible
68+
members.
69+
6770
Type members are aliased by type definitions, and term members are aliased by method definitions. Export aliases copy the type and value parameters of the members they refer to.
6871
Export aliases are always `final`. Aliases of implied instances are again `implied` (and aliases of old-style implicits are `implicit`). There are no other modifiers that can be given to an alias. This has the following consequences for overriding:
6972

@@ -141,4 +144,4 @@ With export clauses, the following steps are added:
141144

142145
It is important that steps 6 and 7 are done in sequence: We first compute the types of _all_
143146
paths in export clauses and only after this is done we enter any export aliases as class members. This means that a path of an export clause cannot refer to an alias made available
144-
by another export clause of the same class object.
147+
by another export clause of the same class.

0 commit comments

Comments
 (0)