Skip to content

Commit dc13596

Browse files
authored
Merge pull request #4925 from dwijnand/patch-1
Fix docs: implicit conversions from singleton types work
2 parents 72fd1cb + 5d7f9fd commit dc13596

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

docs/docs/reference/changed/implicit-resolution.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ affect implicits on the language level.
2424
...
2525
}
2626

27-
2. Implicit parameters may not have singleton types.
28-
29-
/*!*/ def f(implicit x: y.type) // error `y.type` not allowed as type of implicit
30-
31-
3. Nesting is now taken into account for selecting an implicit.
27+
2. Nesting is now taken into account for selecting an implicit.
3228
Consider for instance the following scenario:
3329

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

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

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

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

0 commit comments

Comments
 (0)