We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b03fbd commit b07b909Copy full SHA for b07b909
docs/docs/reference/metaprogramming/macros.md
@@ -139,10 +139,10 @@ It is possible to convert any `Expr[T => R]` into `Expr[T] => Expr[R]` and back.
139
These conversions can be implemented as follows:
140
141
```scala
142
-def to[T, R](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] =
+def to[T: Type, R: Type](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] =
143
'{ (x: T) => ${ f('x) } }
144
145
-def from[T, R](f: Expr[T => R])(using QuoteContext): Expr[T] => Expr[R] =
+def from[T: Type, R: Type](f: Expr[T => R])(using QuoteContext): Expr[T] => Expr[R] =
146
(x: Expr[T]) => '{ $f($x) }
147
```
148
0 commit comments