summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index cb4eab335b..bb7dc3746b 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -978,7 +978,7 @@ trait Contexts { self: Analyzer =>
*/
def isInPackageObject(sym: Symbol, pkg: Symbol): Boolean = {
if (sym.isOverloaded) sym.alternatives.exists(alt => isInPackageObject(alt, pkg))
- else pkg.isPackage && sym.owner != pkg && requiresQualifier(sym)
+ else pkg.hasPackageFlag && sym.owner != pkg && requiresQualifier(sym)
}
def isNameInScope(name: Name) = lookupSymbol(name, _ => true).isSuccess
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 9a3f6a6f3f..0a044b23d9 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -838,7 +838,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
/** The package object symbol corresponding to this package or package class symbol, or NoSymbol otherwise */
def packageObject: Symbol =
if (isPackageClass) tpe.packageObject
- else if (isPackage) moduleClass.packageObject
+ else if (hasPackageFlag) moduleClass.packageObject
else NoSymbol
/** If this is a constructor, its owner: otherwise this.