@@ -920,8 +920,9 @@ class Namer { typer: Typer =>
920
920
end if
921
921
}
922
922
923
- protected def cookIfJava (tp : Type )(using Context ): Type =
924
- if ctx.compilationUnit.isJava then ClassfileParser .cook.apply(tp) else tp
923
+ protected def cookIfJava (denot : SymDenotation )(using Context ): Unit =
924
+ if ctx.compilationUnit.isJava then
925
+ denot.info = ClassfileParser .cook.apply(denot.info)
925
926
926
927
/** Intentionally left without `implicit ctx` parameter. We need
927
928
* to pick up the context at the point where the completer was created.
@@ -933,7 +934,8 @@ class Namer { typer: Typer =>
933
934
denot.info = typeSig(sym)
934
935
invalidateIfClashingSynthetic(denot)
935
936
Checking .checkWellFormed(sym)
936
- denot.info = cookIfJava(avoidPrivateLeaks(sym))
937
+ denot.info = avoidPrivateLeaks(sym)
938
+ cookIfJava(denot)
937
939
}
938
940
}
939
941
@@ -1292,7 +1294,8 @@ class Namer { typer: Typer =>
1292
1294
1293
1295
Checking .checkWellFormed(cls)
1294
1296
if (isDerivedValueClass(cls)) cls.setFlag(Final )
1295
- cls.info = cookIfJava(avoidPrivateLeaks(cls))
1297
+ cls.info = avoidPrivateLeaks(cls)
1298
+ cookIfJava(cls)
1296
1299
cls.baseClasses.foreach(_.invalidateBaseTypeCache()) // we might have looked before and found nothing
1297
1300
cls.setNoInitsFlags(parentsKind(parents), untpd.bodyKind(rest))
1298
1301
if (cls.isNoInitsClass) cls.primaryConstructor.setFlag(StableRealizable )
0 commit comments