Skip to content

Commit 16c92fa

Browse files
committed
.
1 parent 8b85266 commit 16c92fa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ object SymbolLoaders {
337337
)(using Context): Unit =
338338
val hasClasses = jarClasspath.classes(fullPackageName).nonEmpty
339339
val hasPackages = jarClasspath.packages(fullPackageName).nonEmpty
340-
val isUnderScala = packageClass.ownersIterator.contains(defn.ScalaPackageClass)
341340

342341
if hasClasses then
343342
// if the package contains classes in jarClasspath, the package is invalidated (or removed if there are no more classes in it)
@@ -346,7 +345,7 @@ object SymbolLoaders {
346345
val loader = new PackageLoader(packageVal, fullClasspath)
347346
loader.enterClasses(defn.EmptyPackageClass, fullPackageName, flat = false)
348347
loader.enterClasses(defn.EmptyPackageClass, fullPackageName, flat = true)
349-
else if isUnderScala then
348+
else if packageClass.ownersIterator.contains(defn.ScalaPackageClass) then
350349
// For scala packages, enter new classes into the existing scope without
351350
// replacing the package info (which would cause cyclic references).
352351
// Use jarClasspath (not fullClasspath) to only enter new classes from the JAR.

0 commit comments

Comments
 (0)