Skip to content

Commit b52a42f

Browse files
committed
Tweak maybeChild test
Use originDenotation of children instead of going back to typerPhase
1 parent ca20ed2 commit b52a42f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

+4-6
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,9 @@ object SymDenotations {
15891589
// If owner is a package, we complete only
15901590
// children that are defined in the same file as their parents.
15911591
def maybeChild(sym: Symbol) =
1592-
(sym.isClass && !this.is(JavaDefined) || sym.is(EnumVal))
1592+
(sym.isClass && !this.is(JavaDefined) || sym.originDenotation.is(EnumVal))
15931593
&& !owner.is(Package)
1594-
|| sym.infoOrCompleter.match
1594+
|| sym.originDenotation.infoOrCompleter.match
15951595
case _: SymbolLoaders.SecondCompleter => sym.associatedFile == this.symbol.associatedFile
15961596
case _ => false
15971597

@@ -1605,10 +1605,8 @@ object SymDenotations {
16051605
// Make sure all visible children are completed, so that
16061606
// they show up in Child annotations. A possible child is visible if it
16071607
// is defined in the same scope as `cls` or in the companion object of `cls`.
1608-
inContext(ctx.withPhase(ctx.typerPhase)) {
1609-
completeChildrenIn(owner)
1610-
completeChildrenIn(companionClass)
1611-
}
1608+
completeChildrenIn(owner)
1609+
completeChildrenIn(companionClass)
16121610
setFlag(ChildrenQueried)
16131611

16141612
annotations.collect { case Annotation.Child(child) => child }.reverse

0 commit comments

Comments
 (0)