Skip to content
Snippets Groups Projects
Commit cc87ca9e authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Always rely on CaseClassPattern, not InstanceOfPattern

parent a99ba210
Branches
Tags
No related merge requests found
......@@ -1159,12 +1159,7 @@ object TreeOps {
}
}
if (subconds.forall(_.isInstanceOf[WildcardPattern])) {
// nothing to check underneath
InstanceOfPattern(Some(binder), cd)
} else {
CaseClassPattern(Some(binder), cd, subconds)
}
CaseClassPattern(Some(binder), cd, subconds)
}
val (scrutinees, patterns) = scrutSet.toSeq.map(s => (s, computePatternFor(conditions(s), s))) unzip
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment