@@ -630,6 +630,32 @@ object Symbols {
630630 owner.thisType, modcls, parents, decls, TermRef (owner.thisType, module)),
631631 privateWithin, coord, assocFile)
632632
633+ /** Same as `newCompleteModuleSymbol` except that `parents` can be a list of arbitrary
634+ * types which get normalized into type refs and parameter bindings.
635+ */
636+ def newNormalizedModuleSymbol (
637+ owner : Symbol ,
638+ name : TermName ,
639+ modFlags : FlagSet ,
640+ clsFlags : FlagSet ,
641+ parentTypes : List [Type ],
642+ decls : Scope ,
643+ privateWithin : Symbol = NoSymbol ,
644+ coord : Coord = NoCoord ,
645+ assocFile : AbstractFile | Null = null )(using Context ): TermSymbol = {
646+ def completer (module : Symbol ) = new LazyType {
647+ def complete (denot : SymDenotation )(using Context ): Unit = {
648+ val cls = denot.asClass.classSymbol
649+ val decls = newScope
650+ denot.info = ClassInfo (owner.thisType, cls, parentTypes.map(_.dealias), decls, TermRef (owner.thisType, module))
651+ }
652+ }
653+ newModuleSymbol(
654+ owner, name, modFlags, clsFlags,
655+ (module, modcls) => completer(module),
656+ privateWithin, coord, assocFile)
657+ }
658+
633659 /** Create a package symbol with associated package class
634660 * from its non-info fields and a lazy type for loading the package's members.
635661 */
0 commit comments