diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-10-08 21:52:15 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-10-08 21:52:15 +0200 |
commit | ff051e29eae9139a688664f3531028cd89df4c75 (patch) | |
tree | 259bff55d00a912c69c9536b2f64e719402ebace /src/compiler | |
parent | c038732f1b302dd128b32512aab4cf0826752599 (diff) | |
download | scala-ff051e29eae9139a688664f3531028cd89df4c75.tar.gz scala-ff051e29eae9139a688664f3531028cd89df4c75.tar.bz2 scala-ff051e29eae9139a688664f3531028cd89df4c75.zip |
SI-8894 dealias when looking at tuple components
Classic bait-and-switch: `isTupleType` dealiases, but `typeArgs` does not.
When deciding with `isTupleType`, process using `tupleComponents`.
Similar for other combos. We should really enforce this using extractors,
and only decouple when performance is actually impacted.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala index a8852a3ff3..21e90b1d78 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala @@ -172,7 +172,6 @@ trait TreeAndTypeAnalysis extends Debugging { // a type is "uncheckable" (for exhaustivity) if we don't statically know its subtypes (i.e., it's unsealed) // we consider tuple types with at least one component of a checkable type as a checkable type def uncheckableType(tp: Type): Boolean = { - def tupleComponents(tp: Type) = tp.normalize.typeArgs val checkable = ( (isTupleType(tp) && tupleComponents(tp).exists(tp => !uncheckableType(tp))) || enumerateSubtypes(tp).nonEmpty) |