You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/other-new-features/export.md
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -47,11 +47,11 @@ An export clause has the same format as an import clause. Its general form is:
47
47
```
48
48
It consists of a qualifier expression `path`, which must be a stable identifier, followed by
49
49
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:
51
51
52
52
- A _simple selector_`x` creates aliases for all eligible members of `path` that are named `x`.
53
53
- 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
55
55
wildcard selector.
56
56
- A _wildcard selector_ creates aliases for all eligible members of `path` except for
57
57
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:
64
64
- it is an `implied` instance (or an old-style `implicit` value)
65
65
if and only if the export is `implied`.
66
66
67
+
It is a compile-time error if a simple or renaming selector does not identify any eligible
68
+
members.
69
+
67
70
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.
68
71
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:
69
72
@@ -141,4 +144,4 @@ With export clauses, the following steps are added:
141
144
142
145
It is important that steps 6 and 7 are done in sequence: We first compute the types of _all_
143
146
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.
0 commit comments