summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-29 18:40:44 +0000
committerPaul Phillips <paulp@improving.org>2011-05-29 18:40:44 +0000
commitccb438ff74eececcffdb2fc5c4aeafe8a96307d6 (patch)
tree151bd6624a0dad55cd7d279246e96ed485018058
parent46897927575bf25e8d2a1816b0e084bd3ceaf09f (diff)
downloadscala-ccb438ff74eececcffdb2fc5c4aeafe8a96307d6.tar.gz
scala-ccb438ff74eececcffdb2fc5c4aeafe8a96307d6.tar.bz2
scala-ccb438ff74eececcffdb2fc5c4aeafe8a96307d6.zip
Fixed interpreter wrapper spotting logic to mak...
Fixed interpreter wrapper spotting logic to make sure the $iw in question is in a package. Closes #4595, no review.
-rw-r--r--src/compiler/scala/reflect/internal/Symbols.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/internal/Symbols.scala b/src/compiler/scala/reflect/internal/Symbols.scala
index 751586e810..a37fc16ba5 100644
--- a/src/compiler/scala/reflect/internal/Symbols.scala
+++ b/src/compiler/scala/reflect/internal/Symbols.scala
@@ -318,8 +318,11 @@ trait Symbols /* extends reflect.generic.Symbols*/ { self: SymbolTable =>
final def isRootPackage = isPackage && owner == NoSymbol
/** Does this symbol denote a wrapper created by the repl? */
- final def isInterpreterWrapper = (isModule || isModuleClass) && nme.isReplWrapperName(name)
-
+ final def isInterpreterWrapper = (
+ (isModule || isModuleClass)
+ && owner.isPackageClass
+ && nme.isReplWrapperName(name)
+ )
/** Is this symbol an effective root for fullname string?
*/
def isEffectiveRoot = isRoot || isEmptyPackageClass || isInterpreterWrapper
@@ -388,7 +391,8 @@ trait Symbols /* extends reflect.generic.Symbols*/ { self: SymbolTable =>
* unpleasantries like Predef.String, $iw.$iw.Foo and <empty>.Bippy.
*/
final def printWithoutPrefix = !settings.debug.value && (
- isScalaPackageClass || isPredefModule || isEffectiveRoot || isAnonOrRefinementClass || isInterpreterWrapper
+ isScalaPackageClass || isPredefModule || isEffectiveRoot || isAnonOrRefinementClass ||
+ nme.isReplWrapperName(name) // not isInterpreterWrapper due to nesting
)
/** Is symbol a monomorphic type?