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 {
2525
2626/** This phase ensures that the right hand side of parameterless alias implicits
2727 * 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
2929 *
3030 * implicit a for TC = rhs
3131 *
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
4141 implicit global for ExecutionContext = new ForkJoinContext ()
4242 implicit config for Config = default.config
4343
44- def ctx : Context
44+ val ctx : Context
4545 implicit for Context = ctx
4646 ```
4747 would map to
4848 ```scala
49- private [this ] var global$cache : ExecutionContext | Null = null
49+ private [this ] var global$_cache : ExecutionContext | Null = null
5050 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
5353 }
5454
5555 final implicit val config : Config = default.config
5656
57- final implicit def Context_repr = ctx
57+ val ctx : Context
58+ final implicit def Context_ev = ctx
5859 ```
5960
6061### Anonymous Implicit Instances
You can’t perform that action at this time.
0 commit comments