2
2
layout : doc-page
3
3
title : " Changes in Implicit Resolution"
4
4
---
5
-
5
+ This page describes changes to the implicit resolution of old-style ` implicit ` s in Dotty.
6
6
Implicit resolution uses a new algorithm which caches implicit results
7
7
more aggressively for performance. There are also some changes that
8
8
affect implicits on the language level.
@@ -39,7 +39,7 @@ affect implicits on the language level.
39
39
due to _shadowing_ (where an implicit is hidden by a nested definition)
40
40
no longer applies.
41
41
42
- 3 . Package prefixes no longer contribute to the implicit scope of a type .
42
+ 3 . Package prefixes no longer contribute to the implicit search scope of a type .
43
43
Example :
44
44
```scala
45
45
package p
@@ -52,7 +52,7 @@ affect implicits on the language level.
52
52
```
53
53
Both `a` and `b` are visible as implicits at the point of the definition
54
54
of `type C`. However , a reference to `p.o.C` outside of package `p` will
55
- have only `b` in its implicit scope but not `a`.
55
+ have only `b` in its implicit search scope but not `a`.
56
56
57
57
4 . The treatment of ambiguity errors has changed. If an ambiguity is encountered
58
58
in some recursive step of an implicit search, the ambiguity is propagated to the caller.
@@ -85,7 +85,7 @@ affect implicits on the language level.
85
85
5 . The treatment of divergence errors has also changed. A divergent implicit is
86
86
treated as a normal failure, after which alternatives are still tried. This also makes
87
87
sense : Encountering a divergent implicit means that we assume that no finite
88
- solution can be found on the given path , but another path can still be tried. By contrast
88
+ solution can be found on the corresponding path, but another path can still be tried. By contrast
89
89
most (but not all) divergence errors in Scala 2 would terminate the implicit
90
90
search as a whole.
91
91
0 commit comments