@@ -67,7 +67,7 @@ import scala.quoted._
67
67
* '{ while e0 do e1 } =?= '{ while p0 do p1 } ===> '{e0} =?= '{p0} &&& '{e1} =?= '{p1}
68
68
*
69
69
* /* Match assign */
70
- * '{ e0 = e1 } =?= '{ p0 = p1 } && '{e0} =?= '{p0} ===> '{e1} =?= '{p1}
70
+ * '{ e0 = e1 } =?= '{ p0 = p1 } ==> '{e0} =?= '{p0} &&& '{e1} =?= '{p1}
71
71
*
72
72
* /* Match new */
73
73
* '{ new T } =?= '{ new T } ===> matched
@@ -316,22 +316,15 @@ private[quoted] object Matcher {
316
316
qual1 =?= qual2
317
317
318
318
/* Match reference */
319
- // TODO could be subsumed by the next case
320
- case (Ident (_), Ident (_)) if scrutinee.symbol == pattern.symbol || summon[Env ].get(scrutinee.symbol).contains(pattern.symbol) =>
321
- matched
322
-
323
- /* Match reference */
324
- case (_ : Ref , _ : Ref ) if scrutinee.symbol == pattern.symbol =>
319
+ case (_ : Ref , _ : Ref ) if scrutinee.symbol == pattern.symbol || summon[Env ].get(scrutinee.symbol).contains(pattern.symbol) =>
325
320
matched
326
321
327
322
/* Match application */
328
- // TODO may not need to check the symbol (done in fn1 =?= fn2)
329
- case (Apply (fn1, args1), Apply (fn2, args2)) if fn1.symbol == fn2.symbol || summon[Env ].get(fn1.symbol).contains(fn2.symbol) =>
323
+ case (Apply (fn1, args1), Apply (fn2, args2)) =>
330
324
fn1 =?= fn2 &&& args1 =?= args2
331
325
332
326
/* Match type application */
333
- // TODO may not need to check the symbol (done in fn1 =?= fn2)
334
- case (TypeApply (fn1, args1), TypeApply (fn2, args2)) if fn1.symbol == fn2.symbol || summon[Env ].get(fn1.symbol).contains(fn2.symbol) =>
327
+ case (TypeApply (fn1, args1), TypeApply (fn2, args2)) =>
335
328
fn1 =?= fn2 &&& args1 =?= args2
336
329
337
330
case (Block (stats1, expr1), Block (binding :: stats2, expr2)) if isTypeBinding(binding) =>
@@ -365,11 +358,7 @@ private[quoted] object Matcher {
365
358
366
359
/* Match assign */
367
360
case (Assign (lhs1, rhs1), Assign (lhs2, rhs2)) =>
368
- val lhsMatch =
369
- if ((lhs1 =?= lhs2).isMatch) matched
370
- else notMatched
371
- // TODO lhs1 =?= lhs2 &&& rhs1 =?= rhs2
372
- lhsMatch &&& rhs1 =?= rhs2
361
+ lhs1 =?= lhs2 &&& rhs1 =?= rhs2
373
362
374
363
/* Match new */
375
364
case (New (tpt1), New (tpt2)) if tpt1.tpe.typeSymbol == tpt2.tpe.typeSymbol =>
0 commit comments