Skip to content

Commit 64bff47

Browse files
committed
Port to QuoteScope
1 parent 1cd140c commit 64bff47

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/src-bootstrapped/scala/quoted/Consts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object Consts {
1515
* }
1616
* ```
1717
*/
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]] =
1919
exprs.foldRight(Option(List.empty[T])) { (elem, acc) =>
2020
(elem, acc) match {
2121
case (Const(value), Some(lst)) => Some(value :: lst)

library/src-bootstrapped/scala/quoted/Expr.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ object Expr {
9696
* Given list of statements `s1 :: s2 :: ... :: Nil` and an expression `e` the resulting expression
9797
* will be equivalent to `'{ $s1; $s2; ...; $e }`.
9898
*/
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]]
102102
}
103103

104104
/** Lift a value into an expression containing the construction of that value */

0 commit comments

Comments
 (0)