Skip to content

using as for renaming in export doc #15305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/_docs/reference/other-new-features/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Copier:
private val scanUnit = new Scanner

export scanUnit.scan
export printUnit.{status => _, *}
export printUnit.{status as _, *}

def status: List[String] = printUnit.status ++ scanUnit.status
```
Expand Down Expand Up @@ -55,8 +55,8 @@ one or more selectors `sel_i` that identify what gets an alias. Selectors can be
of one of the following forms:

- A _simple selector_ `x` creates aliases for all eligible members of `path` that are named `x`.
- 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`.
- An _omitting selector_ `x => _` prevents `x` from being aliased by a subsequent
- A _renaming selector_ `x as y` creates aliases for all eligible members of `path` that are named `x`, but the alias is named `y` instead of `x`.
- An _omitting selector_ `x as _` prevents `x` from being aliased by a subsequent
wildcard selector.
- 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.
- A _wildcard selector_ `*` creates aliases for all eligible members of `path` except for given instances,
Expand Down