File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1247,12 +1247,12 @@ object SymDenotations {
12471247 || isClass
12481248 && (! isOneOf(EffectivelyOpenFlags ) || isLocalToCompilationUnit)
12491249
1250- final def isLocalToCompilationUnitIgnoringPrivate (using Context ): Boolean =
1251- owner.ownersIterator.takeWhile(! _.isStaticOwner).exists(_.isTerm)
1252- || accessBoundary(defn.RootClass ).isProperlyContainedIn(symbol.topLevelClass)
1253-
1250+ /** Is symbol visible only in the current compilation unit? */
12541251 final def isLocalToCompilationUnit (using Context ): Boolean =
1255- is(Private ) || isLocalToCompilationUnitIgnoringPrivate
1252+ is(Private )
1253+ || owner.isTerm
1254+ || privateWithin.exists && ! privateWithin.is(Package )
1255+ || ! owner.is(Package ) && owner.isLocalToCompilationUnit
12561256
12571257 final def isTransparentClass (using Context ): Boolean =
12581258 is(TransparentType ) || defn.isAssumedTransparent(symbol)
You can’t perform that action at this time.
0 commit comments