File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments