You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/other-new-features/quoted-pattern-spec.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,18 @@ def foo(x: Expr[Int]) given tasty.Reflect: Expr[Int] = x match {
18
18
```
19
19
In the example above we have `$a` which provides a `Bind[Int]`, `$x` which provides an `Expr[Int]` and `${Bind(`a`)}` which probides an `Expr[Int]` that is pattern matched against `Bind(`a`)` to check that it is a reference to `a`.
20
20
21
-
Quoted patterns are transformed during typer to a call of `scala.internal.quoted.Matcher.unapply` which splits the quoted code into the patterns and a reifiable quote that will be used as witnesses at runtime.
21
+
Quoted patterns are transformed during typer to a call of `scala.internal.quoted.Expr.unapply` which splits the quoted code into the patterns and a reifiable quote that will be used as witnesses at runtime.
22
22
23
23
```scala
24
24
deffoo(x: Expr[Int]) giventasty.Reflect:Expr[Int] = x match {
def (scrutinee: Tree) =#=pattern: Tree) givenEnv:Matching// described by cases in the tables below
54
54
55
55
defenvWith(equiv: (Symbol, Symbol)*) givenEnv:Env// Adds to the current environment the fact that s1 from the scrutinee is equivalent to s2 in the pattern
0 commit comments