@@ -826,7 +826,7 @@ class Namer { typer: Typer =>
826826 else
827827 try
828828 completeInCreationContext(denot)
829- if (denot.isCompleted) registerIfChild (denot)
829+ if (denot.isCompleted) registerIfChildInCreationContext (denot)
830830 catch
831831 case ex : CompilationUnit .SuspendException =>
832832 val completer = SuspendCompleter ()
@@ -915,10 +915,12 @@ class Namer { typer: Typer =>
915915 denot.markAbsent()
916916 end invalidateIfClashingSynthetic
917917
918- /** If completed symbol is an enum value or a named class, register it as a child
918+ /** Intentionally left without `using Context` parameter.
919+ * This action should be performed in the context of where the completer was created.
920+ * If completed symbol is an enum value or a named class, register it as a child
919921 * in all direct parent classes which are sealed.
920922 */
921- def registerIfChild (denot : SymDenotation )( using Context ): Unit = {
923+ def registerIfChildInCreationContext (denot : SymDenotation ): Unit = {
922924 val sym = denot.symbol
923925
924926 def register (child : Symbol , parentCls : ClassSymbol ) = {
@@ -942,7 +944,7 @@ class Namer { typer: Typer =>
942944 end if
943945 }
944946
945- /** Intentionally left without `implicit ctx ` parameter. We need
947+ /** Intentionally left without `using Context ` parameter. We need
946948 * to pick up the context at the point where the completer was created.
947949 */
948950 def completeInCreationContext (denot : SymDenotation ): Unit = {
0 commit comments