@@ -137,7 +137,7 @@ object Matcher {
137137
138138 extension (scrutinees : List [Tree ]):
139139 /** Check that all trees match with =?= and concatenate the results with &&& */
140- private def =?= (patterns : List [Tree ])(using Context , Env ): Matching =
140+ private def =?= (patterns : List [Tree ])(using Env ): Matching =
141141 matchLists(scrutinees, patterns)(_ =?= _)
142142
143143 extension (scrutinee0 : Tree ):
@@ -149,7 +149,7 @@ object Matcher {
149149 * @param `summon[Env]` Set of tuples containing pairs of symbols (s, p) where s defines a symbol in `scrutinee` which corresponds to symbol p in `pattern`.
150150 * @return `None` if it did not match or `Some(tup: Tuple)` if it matched where `tup` contains the contents of the holes.
151151 */
152- private def =?= (pattern0 : Tree )(using Context , Env ): Matching = {
152+ private def =?= (pattern0 : Tree )(using Env ): Matching = {
153153
154154 /* Match block flattening */ // TODO move to cases
155155 /** Normalize the tree */
@@ -299,7 +299,7 @@ object Matcher {
299299 /* Match val */
300300 case (ValDef (_, tpt1, rhs1), ValDef (_, tpt2, rhs2)) if checkValFlags() =>
301301 def rhsEnv = summon[Env ] + (scrutinee.symbol -> pattern.symbol)
302- tpt1 =?= tpt2 &&& treeOptMatches(rhs1, rhs2)(using summon[ Context ], rhsEnv)
302+ tpt1 =?= tpt2 &&& treeOptMatches(rhs1, rhs2)(using rhsEnv)
303303
304304 /* Match def */
305305 case (DefDef (_, typeParams1, paramss1, tpt1, Some (rhs1)), DefDef (_, typeParams2, paramss2, tpt2, Some (rhs2))) =>
@@ -348,11 +348,11 @@ object Matcher {
348348
349349 private object ClosedPatternTerm {
350350 /** Matches a term that does not contain free variables defined in the pattern (i.e. not defined in `Env`) */
351- def unapply (term : Term )(using Context , Env ): Option [term.type ] =
351+ def unapply (term : Term )(using Env ): Option [term.type ] =
352352 if freePatternVars(term).isEmpty then Some (term) else None
353353
354354 /** Return all free variables of the term defined in the pattern (i.e. defined in `Env`) */
355- def freePatternVars (term : Term )(using ctx : Context , env : Env ): Set [Symbol ] =
355+ def freePatternVars (term : Term )(using env : Env ): Set [Symbol ] =
356356 val accumulator = new TreeAccumulator [Set [Symbol ]] {
357357 def foldTree (x : Set [Symbol ], tree : Tree )(owner : Symbol ): Set [Symbol ] =
358358 tree match
@@ -363,7 +363,7 @@ object Matcher {
363363 }
364364
365365 private object IdentArgs {
366- def unapply (args : List [Term ])( using Context ) : Option [List [Ident ]] =
366+ def unapply (args : List [Term ]): Option [List [Ident ]] =
367367 args.foldRight(Option (List .empty[Ident ])) {
368368 case (id : Ident , Some (acc)) => Some (id :: acc)
369369 case (Block (List (DefDef (" $anonfun" , Nil , List (params), Inferred (), Some (Apply (id : Ident , args)))), Closure (Ident (" $anonfun" ), None )), Some (acc))
@@ -373,7 +373,7 @@ object Matcher {
373373 }
374374 }
375375
376- private def treeOptMatches (scrutinee : Option [Tree ], pattern : Option [Tree ])(using Context , Env ): Matching = {
376+ private def treeOptMatches (scrutinee : Option [Tree ], pattern : Option [Tree ])(using Env ): Matching = {
377377 (scrutinee, pattern) match {
378378 case (Some (x), Some (y)) => x =?= y
379379 case (None , None ) => matched
0 commit comments