Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions library/src-bootstrapped/scala/quoted/Expr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,4 @@ object Expr {
}
}

object StringContext {
/** Matches a `StringContext(part0, part1, ...)` and extracts the parts of a call to if the
* parts are passed explicitly. Returns the equvalent to `Seq('{part0}, '{part1}, ...)`.
*/
def unapply(sc: Expr[StringContext])(using Quotes): Option[Seq[Expr[String]]] =
sc match
case '{ scala.StringContext(${Varargs(parts)}: _*) } => Some(parts)
case '{ new scala.StringContext(${Varargs(parts)}: _*) } => Some(parts)
case _ => None
}

}