Skip to content

Commit 10b6ba5

Browse files
authored
Merge pull request #12182 from nurekata/patch-1
Replace export wildcards _ with * in doc page
2 parents df7968c + b15e865 commit 10b6ba5

File tree

1 file changed

+7
-7
lines changed
  • docs/docs/reference/other-new-features

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Copier:
2323
private val scanUnit = new Scanner
2424

2525
export scanUnit.scan
26-
export printUnit.{status => _, _}
26+
export printUnit.{status => _, *}
2727

2828
def status: List[String] = printUnit.status ++ scanUnit.status
2929
```
@@ -58,7 +58,7 @@ of one of the following forms:
5858
- An _omitting selector_ `x => _` prevents `x` from being aliased by a subsequent
5959
wildcard selector.
6060
- A _given selector_ `given x` has an optional type bound `x`. It creates aliases for all eligible given instances that conform to either `x`, or `Any` if `x` is omitted, except for members that are named by a previous simple, renaming, or omitting selector.
61-
- A _wildcard selector_ `_` creates aliases for all eligible members of `path` except for given instances,
61+
- A _wildcard selector_ `*` creates aliases for all eligible members of `path` except for given instances,
6262
synthetic members generated by the compiler and those members that are named by a previous simple, renaming, or omitting selector.
6363

6464
A member is _eligible_ if all of the following holds:
@@ -144,15 +144,15 @@ Consider the following example:
144144
```scala
145145
class B { val c: Int }
146146
object a { val b = new B }
147-
export a._
148-
export b._
147+
export a.*
148+
export b.*
149149
```
150150

151-
Is the `export b._` clause legal? If yes, what does it export? Is it equivalent to `export a.b._`? What about if we swap the last two clauses?
151+
Is the `export b.*` clause legal? If yes, what does it export? Is it equivalent to `export a.b.*`? What about if we swap the last two clauses?
152152

153153
```
154-
export b._
155-
export a._
154+
export b.*
155+
export a.*
156156
```
157157

158158
To avoid tricky questions like these, we fix the elaboration order of exports as follows.

0 commit comments

Comments
 (0)