Skip to content

Fix docs: implicit conversions from singleton types work #4925

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
Aug 10, 2018
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
10 changes: 3 additions & 7 deletions docs/docs/reference/changed/implicit-resolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ affect implicits on the language level.
...
}

2. Implicit parameters may not have singleton types.

/*!*/ def f(implicit x: y.type) // error `y.type` not allowed as type of implicit

3. Nesting is now taken into account for selecting an implicit.
2. Nesting is now taken into account for selecting an implicit.
Consider for instance the following scenario:

def f(implicit i: C) = {
Expand All @@ -41,7 +37,7 @@ affect implicits on the language level.
more deeply than `i`. Previously, this would have resulted in an
ambiguity error.

4. The treatment of ambiguity errors has changed. If an ambiguity is encountered
3. The treatment of ambiguity errors has changed. If an ambiguity is encountered
in some recursive step of an implicit search, the ambiguity is propagated to the caller.
Example: Say you have the following definitions:

Expand Down Expand Up @@ -69,7 +65,7 @@ affect implicits on the language level.
which implements negation directly. For any query type `Q`: `Not[Q]` succeeds if and only if
the implicit search for `Q` fails.

5. The treatment of divergence errors has also changed. A divergent implicit is
4. The treatment of divergence errors has also changed. A divergent implicit is
treated as a normal failure, after which alternatives are still tried. This also makes
sense: Encountering a divergent implicit means that we assume that no finite
solution can be found on the given path, but another path can still be tried. By contrast
Expand Down