File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
compiler/src/dotty/tools/dotc/transform
docs/docs/reference/contextual-implicit Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ object CacheAliasImplicits {
25
25
26
26
/** This phase ensures that the right hand side of parameterless alias implicits
27
27
* is cached. It applies to all alias implicits that have neither type parameters
28
- * not a given clause. Example: The alias
28
+ * nor a given clause. Example: The alias
29
29
*
30
30
* implicit a for TC = rhs
31
31
*
Original file line number Diff line number Diff line change @@ -41,20 +41,21 @@ Implicit instances can be mapped to combinations of implicit objects and implici
41
41
implicit global for ExecutionContext = new ForkJoinContext ()
42
42
implicit config for Config = default.config
43
43
44
- def ctx : Context
44
+ val ctx : Context
45
45
implicit for Context = ctx
46
46
```
47
47
would map to
48
48
```scala
49
- private [this ] var global$cache : ExecutionContext | Null = null
49
+ private [this ] var global$_cache : ExecutionContext | Null = null
50
50
final implicit def global : ExecutionContext = {
51
- if (global$cache == null ) global$cache = new ForkJoinContext ()
52
- global$cache
51
+ if (global$_cache == null ) global$_cache = new ForkJoinContext ()
52
+ global$_cache
53
53
}
54
54
55
55
final implicit val config : Config = default.config
56
56
57
- final implicit def Context_repr = ctx
57
+ val ctx : Context
58
+ final implicit def Context_ev = ctx
58
59
```
59
60
60
61
### Anonymous Implicit Instances
You can’t perform that action at this time.
0 commit comments