File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -336,8 +336,7 @@ object PatternMatcher {
336
336
337
337
if (isSyntheticScala2Unapply(unapp.symbol) && caseAccessors.length == args.length)
338
338
def tupleSel (sym : Symbol ) = ref(scrutinee).select(sym)
339
- val isGenericTuple = defn.isTupleClass(caseClass) &&
340
- ! defn.isTupleNType(tree.tpe match { case tp : OrType => tp.join case tp => tp }) // widen even hard unions, to see if it's a union of tuples
339
+ val isGenericTuple = defn.isTupleClass(caseClass) && ! defn.isTupleNType(tree.tpe)
341
340
val components = if isGenericTuple then caseAccessors.indices.toList.map(tupleApp(_, ref(scrutinee))) else caseAccessors.map(tupleSel)
342
341
matchArgsPlan(components, args, onSuccess)
343
342
else if (unapp.tpe <:< (defn.BooleanType ))
You can’t perform that action at this time.
0 commit comments