Skip to content

Commit c2fd6e5

Browse files
committed
Fix after rebase
1 parent bd932a5 commit c2fd6e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/src-bootstrapped/scala/internal/quoted/Matcher.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ object Matcher {
142142
fn1 =#= fn2 && args1 =##= args2
143143

144144
case (Block(stats1, expr1), Block(binding :: stats2, expr2)) if isTypeBinding(binding) =>
145-
reflection.kernel.Context_GADT_addToConstraint(the[Context])(binding.symbol :: Nil)
145+
qctx.tasty.kernel.Context_GADT_addToConstraint(the[Context])(binding.symbol :: Nil)
146146
matched(new SymBinding(binding.symbol)) && Block(stats1, expr1) =#= Block(stats2, expr2)
147147

148148
case (Block(stat1 :: stats1, expr1), Block(stat2 :: stats2, expr2)) =>
@@ -152,7 +152,7 @@ object Matcher {
152152

153153
case (scrutinee, Block(typeBindings, expr2)) if typeBindings.forall(isTypeBinding) =>
154154
val bindingSymbols = typeBindings.map(_.symbol)
155-
reflection.kernel.Context_GADT_addToConstraint(the[Context])(bindingSymbols)
155+
qctx.tasty.kernel.Context_GADT_addToConstraint(the[Context])(bindingSymbols)
156156
bindingSymbols.foldRight(scrutinee =#= expr2)((x, acc) => matched(new SymBinding(x)) && acc)
157157

158158
case (If(cond1, thenp1, elsep1), If(cond2, thenp2, elsep2)) =>
@@ -336,7 +336,7 @@ object Matcher {
336336

337337
val res = {
338338
if (hasTypeSplices) {
339-
implicit val ctx: Context = reflection.kernel.Context_GADT_setFreshGADTBounds(rootContext)
339+
implicit val ctx: Context = qctx.tasty.kernel.Context_GADT_setFreshGADTBounds(rootContext)
340340
val matchings = scrutineeExpr.unseal.underlyingArgument =#= patternExpr.unseal.underlyingArgument
341341
// After matching and doing all subtype check, we have to aproximate all the type bindings
342342
// that we have found and seal them in a quoted.Type

tests/run-macros/quote-matcher-runtime/quoted_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object Macros {
1010
private def impl[A, B](a: Expr[A], b: Expr[B]) given (qctx: QuoteContext): Expr[Unit] = {
1111
import qctx.tasty.{Bind => _, _}
1212

13-
val res = scala.internal.quoted.Matcher.unapply[Tuple](a)(b, true, qctx).map { tup =>
13+
val res = scala.internal.quoted.Matcher.unapply[Tuple, Tuple](a)(b, true, qctx).map { tup =>
1414
tup.toArray.toList.map {
1515
case r: Expr[_] =>
1616
s"Expr(${r.unseal.show})"

0 commit comments

Comments
 (0)