diff options
Diffstat (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/PatternMatcher.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala index 47643f395..1e7d061bf 100644 --- a/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -1443,7 +1443,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans // require (nbSubPats > 0 && (!lastIsStar || isSeq)) protected def subPatRefs(binder: Symbol): List[Tree] = { val refs = if (totalArity > 0 && isSeq) subPatRefsSeq(binder) - else if (defn.isProductSubType(binder.info) && !isSeq) productElemsToN(binder, totalArity) + else if (binder.info.member(nme._1).exists && !isSeq) productElemsToN(binder, totalArity) else ref(binder):: Nil refs } |