diff --git a/docs/docs/reference/tasty-reflect.md b/docs/docs/reference/tasty-reflect.md index a0be7f6a8af8..f2628371a541 100644 --- a/docs/docs/reference/tasty-reflect.md +++ b/docs/docs/reference/tasty-reflect.md @@ -32,7 +32,7 @@ def natConstImpl(x: Expr[Int])(implicit reflection: Reflection): Expr[Int] = { } ``` -`import reflection._` will provide a `unseal` extension method on `quoted.Expr` and `quoted.Type` which return a `reflection.Term` and `reflection.TypeTree` respectively. +`import reflection._` will provide an `unseal` extension method on `quoted.Expr` and `quoted.Type` which returns a `reflection.Term` and `reflection.TypeTree` respectively. It will also import all extractors and methods on TASTy Reflect trees. For example the `Term.Literal(_)` extractor used below. ```scala @@ -52,7 +52,7 @@ def natConstImpl(x: Expr[Int])(implicit reflection: Reflection): Expr[Int] = { To easily know which extractors are needed, the `reflection.Term.show` method returns the string representation of the extractors. -The method `reflection.Term.reify[T]` provides a way to to go back to a `quoted.Expr`. +The method `reflection.Term.reify[T]` provides a way to go back to a `quoted.Expr`. Note that the type must be set explicitly and that if it does not conform to it an exception will be thrown. In the code above we could have replaced `n.toExpr` by `xTree.reify[Int]`.