summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-05-03 02:28:10 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-05-03 02:28:10 -0700
commit48e80cb8c715cf8cb6dc73a5f894838671e385a4 (patch)
tree8c4bef6a82fde0551d2bfcd5a55678af4d2b0875 /src/compiler
parent98972c95ab1e7c0ea2af9c9a958c0de60eb26b3d (diff)
parent30099160320b649b1e8e5f69c8ad1b02478fbfe2 (diff)
downloadscala-48e80cb8c715cf8cb6dc73a5f894838671e385a4.tar.gz
scala-48e80cb8c715cf8cb6dc73a5f894838671e385a4.tar.bz2
scala-48e80cb8c715cf8cb6dc73a5f894838671e385a4.zip
Merge pull request #2440 from retronym/ticket/6771
SI-6771 Alias awareness for checkableType in match analysis.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala4
1 files changed, 3 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 d9f93f27b6..9558542533 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchAnalysis.scala
@@ -99,7 +99,9 @@ trait TreeAndTypeAnalysis extends Debugging {
// TODO: when type tags are available, we will check -- when this is implemented, can we take that into account here?
// similar to typer.infer.approximateAbstracts
object typeArgsToWildcardsExceptArray extends TypeMap {
- def apply(tp: Type): Type = tp match {
+ // SI-6771 dealias would be enough today, but future proofing with the dealiasWiden.
+ // See neg/t6771b.scala for elaboration
+ def apply(tp: Type): Type = tp.dealiasWiden match {
case TypeRef(pre, sym, args) if args.nonEmpty && (sym ne ArrayClass) =>
TypeRef(pre, sym, args map (_ => WildcardType))
case _ =>