From ca741091c898e17d082c496443b6b258ef4020e8 Mon Sep 17 00:00:00 2001 From: Kota Mizushima Date: Thu, 17 Mar 2016 20:17:43 +0900 Subject: * Replace isPackage with hasPackageFlag --- src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 2 +- src/reflect/scala/reflect/internal/Symbols.scala | 2 +- 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. -- cgit v1.2.3