Skip to content

Commit b07b909

Browse files
committed
Fix #9197: Fix documentation
Add missing `quoted.Type`s
1 parent 6b03fbd commit b07b909

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/metaprogramming/macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ It is possible to convert any `Expr[T => R]` into `Expr[T] => Expr[R]` and back.
139139
These conversions can be implemented as follows:
140140

141141
```scala
142-
def to[T, R](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] =
142+
def to[T: Type, R: Type](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] =
143143
'{ (x: T) => ${ f('x) } }
144144

145-
def from[T, R](f: Expr[T => R])(using QuoteContext): Expr[T] => Expr[R] =
145+
def from[T: Type, R: Type](f: Expr[T => R])(using QuoteContext): Expr[T] => Expr[R] =
146146
(x: Expr[T]) => '{ $f($x) }
147147
```
148148

0 commit comments

Comments
 (0)