File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
library/src/scala/internal/quoted Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -478,17 +478,19 @@ object Matcher {
478478 val matched : Matching = Some (Tuple ())
479479 def matched (x : Any ): Matching = Some (Tuple1 (x))
480480
481- def (self : Matching ) asOptionOfTuple : Option [Tuple ] = self
482-
483- /** Concatenates the contents of two successful matchings or return a `notMatched` */
484- def (self : Matching ) &&& (that : => Matching ): Matching = self match {
485- case Some (x) =>
486- that match {
487- case Some (y) => Some (x ++ y)
488- case _ => None
489- }
490- case _ => None
491- }
481+ extension (self : Matching ):
482+ def asOptionOfTuple : Option [Tuple ] = self
483+
484+ /** Concatenates the contents of two successful matchings or return a `notMatched` */
485+ def &&& (that : => Matching ): Matching = self match {
486+ case Some (x) =>
487+ that match {
488+ case Some (y) => Some (x ++ y)
489+ case _ => None
490+ }
491+ case _ => None
492+ }
493+ end extension
492494
493495 }
494496
You can’t perform that action at this time.
0 commit comments