diff --git a/compiler/src/dotty/tools/dotc/tastyreflect/TastyImpl.scala b/compiler/src/dotty/tools/dotc/tastyreflect/TastyImpl.scala index 27e1e849b9d4..048198359ae2 100644 --- a/compiler/src/dotty/tools/dotc/tastyreflect/TastyImpl.scala +++ b/compiler/src/dotty/tools/dotc/tastyreflect/TastyImpl.scala @@ -587,10 +587,14 @@ class TastyImpl(val rootContext: Contexts.Context) extends scala.tasty.Tasty { s object Unapply extends UnapplyExtractor { def unapply(x: Pattern)(implicit ctx: Context): Option[(Term, List[Term], List[Pattern])] = x match { - case Trees.UnApply(fun, implicits, patterns) => Some((fun, implicits, patterns)) - case Trees.Typed(Trees.UnApply(fun, implicits, patterns), _) => Some((fun, implicits, patterns)) + case Trees.UnApply(fun, implicits, patterns) => Some((fun, implicits, effectivePatterns(patterns))) + case Trees.Typed(Trees.UnApply(fun, implicits, patterns), _) => Some((fun, implicits, effectivePatterns(patterns))) case _ => None } + private def effectivePatterns(patterns: List[Pattern]): List[Pattern] = patterns match { + case patterns0 :+ Trees.SeqLiteral(elems, _) => patterns0 ::: elems + case _ => patterns + } } object Alternative extends AlternativeExtractor { diff --git a/compiler/test/dotc/run-decompilation.blacklist b/compiler/test/dotc/run-decompilation.blacklist index 053324373841..07f14e74001f 100644 --- a/compiler/test/dotc/run-decompilation.blacklist +++ b/compiler/test/dotc/run-decompilation.blacklist @@ -1,9 +1,2 @@ -# scala.MatchError: SeqLiteral in pattern -i3248.scala -t6541.scala - # Stackoverflow t10594.scala - -i4557.scala -i4557a.scala