File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
library/src-bootstrapped/scala/quoted Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ object Consts {
15
15
* }
16
16
* ```
17
17
*/
18
- def unapply [T ](exprs : Seq [Expr [T ]])( using qctx : QuoteContext ): Option [Seq [T ]] =
18
+ def unapply [T ](using s : QuoteScope )( exprs : Seq [s. Expr [T ]]): Option [Seq [T ]] =
19
19
exprs.foldRight(Option (List .empty[T ])) { (elem, acc) =>
20
20
(elem, acc) match {
21
21
case (Const (value), Some (lst)) => Some (value :: lst)
Original file line number Diff line number Diff line change @@ -96,9 +96,9 @@ object Expr {
96
96
* Given list of statements `s1 :: s2 :: ... :: Nil` and an expression `e` the resulting expression
97
97
* will be equivalent to `'{ $s1; $s2; ...; $e }`.
98
98
*/
99
- def block [T ](statements : List [Expr [Any ]], expr : Expr [T ])( using qctx : QuoteContext ) : Expr [T ] = {
100
- import qctx .tasty ._
101
- Block (statements.map(_.unseal), expr.unseal).seal.asInstanceOf [Expr [T ]]
99
+ def block [T ](using s : QuoteScope )( statements : List [s. Expr [Any ]], expr : s. Expr [T ]): s. Expr [T ] = {
100
+ import s .tasty ._
101
+ Block (statements.map(_.unseal), expr.unseal).seal.asInstanceOf [s. Expr [T ]]
102
102
}
103
103
104
104
/** Lift a value into an expression containing the construction of that value */
You can’t perform that action at this time.
0 commit comments