File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -169,15 +169,15 @@ usage. But the code can be made phase correct by adding a binding
169169of a ` Type[T] ` tag:
170170
171171 def reflect[T, U](f: Expr[T] => Expr[U])(implicit t: Type[T]): Expr[T => U] =
172- ’{ (x: ~t) => ~f(’(x))
172+ ’{ (x: ~t) => ~f(’(x)) }
173173
174174In this version of ` reflect ` , the type of ` x ` is now the result of
175175splicing the ` Type ` value ` t ` . This operation _ is_ splice correct -- there
176176is one quote and one splice between the use of ` t ` and its definition.
177177
178178To avoid clutter, the Scala implementation tries to convert any phase-incorrect
179179reference to a type ` T ` to a type-splice, by rewriting ` T ` to ` ~implicitly[Type[T]] ` .
180- For instance, the user-level definition of ` reflect `
180+ For instance, the user-level definition of ` reflect ` :
181181
182182 def reflect[T: Type, U](f: Expr[T] => Expr[U]) Expr[T => U] =
183183 ’{ (x: T) => ~f(’(x)) }
You can’t perform that action at this time.
0 commit comments