diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-04-19 17:17:01 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-04-19 17:17:01 +0000 |
commit | ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7 (patch) | |
tree | a1d594d6080e28562d453d953e97db37292e6916 /src/compiler | |
parent | 7b2bdb4e75f72fbdf4c488aea112d7838f89bc5f (diff) | |
download | scala-ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7.tar.gz scala-ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7.tar.bz2 scala-ed8f3f0b9b31e75b14933e889d6aa105d2c0f0b7.zip |
suppress "scala." prefix in string representati...
suppress "scala." prefix in string representation of types (in error
messages,..)
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 5 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index a00efde133..e3429ceeba 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -212,7 +212,10 @@ trait Symbols { final def isRootPackage = isPackage && name == nme.ROOTPKG final def isEmptyPackage = isPackage && name == nme.EMPTY_PACKAGE_NAME final def isEmptyPackageClass = isPackageClass && name == nme.EMPTY_PACKAGE_NAME.toTypeName - final def isPredefModule = isModule && name == nme.Predef + final def isPredefModule = isModule && name == nme.Predef // not printed as a prefix + final def isScalaPackage = isPackage && name == nme.scala_ // not printed as a prefix + final def isScalaPackageClass = isPackageClass && name == nme.scala_.toTypeName // not printed as a prefix + def isDeprecated = attributes exists (attr => attr.atp.symbol == DeprecatedAttr) diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index 3ad981a38d..78b9f488f9 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -623,7 +623,7 @@ trait Types { override def singleDeref: Type = sym.typeOfThis override def prefixString = if (settings.debug.value) sym.nameString + ".this." - else if (sym.isRoot || sym.isEmptyPackageClass || sym.isInterpreterWrapper) "" + else if (sym.isRoot || sym.isEmptyPackageClass || sym.isInterpreterWrapper || sym.isScalaPackageClass) "" else if (sym.isAnonymousClass || sym.isRefinementClass) "this." else if (sym.isPackageClass) sym.fullNameString + "." else sym.nameString + ".this." @@ -671,7 +671,7 @@ trait Types { override def symbol = sym override def prefix: Type = pre override def prefixString: String = - if ((sym.isEmptyPackage || sym.isInterpreterWrapper || sym.isPredefModule) && !settings.debug.value) "" + if ((sym.isEmptyPackage || sym.isInterpreterWrapper || sym.isPredefModule || sym.isScalaPackage) && !settings.debug.value) "" else pre.prefixString + sym.nameString + "." } @@ -1213,7 +1213,7 @@ A type's symbol should never be inspected directly. override def prefixString = if (settings.debug.value) super.prefixString else if (sym.isRoot || sym.isEmptyPackageClass || sym.isInterpreterWrapper || - sym.isAnonymousClass || sym.isRefinementClass) "" + sym.isAnonymousClass || sym.isRefinementClass || sym.isScalaPackageClass) "" else if (sym.isPackageClass) sym.fullNameString + "." else super.prefixString } |