We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 663d334 commit 3d0fbefCopy full SHA for 3d0fbef
library/src/scala/quoted/Varargs.scala
@@ -39,7 +39,8 @@ object Varargs {
39
def unapply[T](expr: Expr[Seq[T]])(using Quotes): Option[Seq[Expr[T]]] = {
40
import quotes.reflect._
41
def rec(tree: Term): Option[Seq[Expr[T]]] = tree match {
42
- case Typed(Repeated(elems, _), _) => Some(elems.map(x => x.asExpr.asInstanceOf[Expr[T]]))
+ case Repeated(elems, _) => Some(elems.map(x => x.asExpr.asInstanceOf[Expr[T]]))
43
+ case Typed(e, _) => rec(e)
44
case Block(Nil, e) => rec(e)
45
case Inlined(_, Nil, e) => rec(e)
46
case _ => None
0 commit comments