Skip to content

Commit 97bc111

Browse files
authored
doc(givens): change given with using example
1 parent 6bc8d00 commit 97bc111

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/docs/reference/contextual/givens.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ returned for this and all subsequent accesses to `global`. This operation is thr
6262
Alias givens can be anonymous as well, e.g.
6363
```scala
6464
given Position = enclosingTree.position
65-
given (using outer: Context) as Context = outer.withOwner(currentOwner)
65+
given (using config: Config) as Factory = MemoizingFactory(config)
6666
```
67-
<!-- TODO IMO the above example is very bad as the outer Context will always have precedence over the anonymous one. No? -->
6867

6968
An alias given can have type parameters and context parameters just like any other given,
7069
but it can only implement a single type.

0 commit comments

Comments
 (0)