summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-06-15 14:28:23 -0400
committerSimon Ochsenreither <simon@ochsenreither.de>2013-07-17 23:38:28 +0200
commit4d6be05c28c95dcd26922059d773a8bfed6014ef (patch)
tree4cbb711d44ad2b073dd21d03811fdf3d7198b4d0 /src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
parentaeb733147881d8da68d1e520b14112dc826a3977 (diff)
downloadscala-4d6be05c28c95dcd26922059d773a8bfed6014ef.tar.gz
scala-4d6be05c28c95dcd26922059d773a8bfed6014ef.tar.bz2
scala-4d6be05c28c95dcd26922059d773a8bfed6014ef.zip
Make -Ytyper-debug output readable.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
index a93baabc51..b4a37f9943 100644
--- a/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
@@ -167,10 +167,10 @@ trait TypeDiagnostics {
def explainAlias(tp: Type) = {
// Don't automatically normalize standard aliases; they still will be
// expanded if necessary to disambiguate simple identifiers.
- if ((tp eq tp.normalize) || tp.typeSymbolDirect.isInDefaultNamespace) ""
- else {
+ val deepDealias = DealiasedType(tp)
+ if (tp eq deepDealias) "" else {
// A sanity check against expansion being identical to original.
- val s = "" + DealiasedType(tp)
+ val s = "" + deepDealias
if (s == "" + tp) ""
else "\n (which expands to) " + s
}