summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-03-27 22:46:23 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-03-27 22:46:23 -0700
commit66fb8118f9c48c6be703e4e89aaaf8e76e430d5a (patch)
tree3ff5955b14d84ece8b3b6d506f12b61a9a72ed78 /src/compiler
parentf2a74c5ebda2a6d3438203572059a4cee509002d (diff)
parentdd89b006218d76a74d0185392d5e427c0867a33c (diff)
downloadscala-66fb8118f9c48c6be703e4e89aaaf8e76e430d5a.tar.gz
scala-66fb8118f9c48c6be703e4e89aaaf8e76e430d5a.tar.bz2
scala-66fb8118f9c48c6be703e4e89aaaf8e76e430d5a.zip
Merge pull request #2292 from retronym/ticket/7285
SI-7285 Fix match analysis with nested objects
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/patmat/Logic.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
index 22eabb6d6f..0fab48028e 100644
--- a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
+++ b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
@@ -574,6 +574,7 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis {
assert(tp.isInstanceOf[SingletonType])
val toString = tp match {
case ConstantType(c) => c.escapedStringValue
+ case _ if tp.typeSymbol.isModuleClass => tp.typeSymbol.name.toString
case _ => tp.toString
}
Const.unique(tp, new ValueConst(tp, tp.widen, toString))
@@ -623,4 +624,4 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis {
override def toString = "null"
}
}
-} \ No newline at end of file
+}