From 91772a62e2f9ca41127e9e36d96e9a86d4acb05c Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Tue, 30 Jun 2015 14:06:59 +0200 Subject: Patmat: fix sub patterns of Product-1's --- src/dotty/tools/dotc/transform/PatternMatcher.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/transform/PatternMatcher.scala') 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 } -- cgit v1.2.3