summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 711cfba24d..24238b8e41 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -10,6 +10,7 @@ import scala.collection.mutable
import scala.annotation.tailrec
import symtab.Flags._
import scala.language.postfixOps
+import scala.reflect.internal.util.ListOfNil
/** This trait declares methods to create symbols and to enter them into scopes.
*
@@ -464,7 +465,7 @@ trait Namers extends MethodSynthesis {
def enterModuleSymbol(tree : ModuleDef): Symbol = {
var m: Symbol = context.scope lookupModule tree.name
val moduleFlags = tree.mods.flags | MODULE
- if (m.isModule && !m.isPackage && inCurrentScope(m) && (currentRun.canRedefine(m) || m.isSynthetic)) {
+ if (m.isModule && !m.hasPackageFlag && inCurrentScope(m) && (currentRun.canRedefine(m) || m.isSynthetic)) {
// This code accounts for the way the package objects found in the classpath are opened up
// early by the completer of the package itself. If the `packageobjects` phase then finds
// the same package object in sources, we have to clean the slate and remove package object
@@ -487,7 +488,7 @@ trait Namers extends MethodSynthesis {
m.moduleClass setFlag moduleClassFlags(moduleFlags)
setPrivateWithin(tree, m.moduleClass)
}
- if (m.isTopLevel && !m.isPackage) {
+ if (m.isTopLevel && !m.hasPackageFlag) {
m.moduleClass.associatedFile = contextFile
currentRun.symSource(m) = m.moduleClass.sourceFile
registerTopLevelSym(m)
@@ -844,7 +845,7 @@ trait Namers extends MethodSynthesis {
private def widenIfNecessary(sym: Symbol, tpe: Type, pt: Type): Type = {
val getter =
if (sym.isValue && sym.owner.isClass && sym.isPrivate)
- sym.getter(sym.owner)
+ sym.getterIn(sym.owner)
else sym
def isHidden(tp: Type): Boolean = tp match {
case SingleType(pre, sym) =>
@@ -1305,7 +1306,7 @@ trait Namers extends MethodSynthesis {
// by martin: the null case can happen in IDE; this is really an ugly hack on top of an ugly hack but it seems to work
case Some(cda) =>
if (cda.companionModuleClassNamer == null) {
- debugwarn(s"SI-6576 The companion module namer for $meth was unexpectedly null")
+ devWarning(s"SI-6576 The companion module namer for $meth was unexpectedly null")
return
}
val p = (cda.classWithDefault, cda.companionModuleClassNamer)