Skip to content

Commit baa9ff8

Browse files
committed
Remove workaround for scala/bug#5954
It is solved directly now.
1 parent b7c6d59 commit baa9ff8

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/compiler/scala/tools/nsc/typechecker/Namers.scala

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -467,17 +467,6 @@ trait Namers extends MethodSynthesis {
467467

468468
val existingModule = context.scope lookupModule tree.name
469469
if (existingModule.isModule && !existingModule.hasPackageFlag && inCurrentScope(existingModule) && (currentRun.canRedefine(existingModule) || existingModule.isSynthetic)) {
470-
// This code accounts for the way the package objects found in the classpath are opened up
471-
// early by the completer of the package itself. If the `packageobjects` phase then finds
472-
// the same package object in sources, we have to clean the slate and remove package object
473-
// members from the package class.
474-
//
475-
// TODO scala/bug#4695 Pursue the approach in https://github.com/scala/scala/pull/2789 that avoids
476-
// opening up the package object on the classpath at all if one exists in source.
477-
if (existingModule.isPackageObject) {
478-
val packageScope = existingModule.enclosingPackageClass.rawInfo.decls
479-
packageScope.foreach(mem => if (mem.owner != existingModule.enclosingPackageClass) packageScope unlink mem)
480-
}
481470
updatePosFlags(existingModule, tree.pos, moduleFlags)
482471
setPrivateWithin(tree, existingModule)
483472
existingModule.moduleClass andAlso (setPrivateWithin(tree, _))

0 commit comments

Comments
 (0)