@@ -432,11 +432,13 @@ object SymDenotations {
432432 * self type of the enclosing class.
433433 * Otherwise return `info`
434434 *
435- * @param info Is assumed to be a (lambda-abstracted) right hand side TypeAlias
436- * of the opaque type definition.
437- * @param rhs The right hand side tree of the type definition
435+ * @param info Is assumed to be a (lambda-abstracted) right hand side TypeAlias
436+ * of the opaque type definition.
437+ * @param rhs The right hand side tree of the type definition
438+ * @param tparams The type parameters with which the right-hand side bounds should be abstracted
439+ *
438440 */
439- def opaqueToBounds (info : Type , rhs : tpd.Tree )(using Context ): Type =
441+ def opaqueToBounds (info : Type , rhs : tpd.Tree , tparams : List [ TypeParamInfo ] )(using Context ): Type =
440442
441443 def setAlias (tp : Type ) =
442444 def recur (self : Type ): Unit = self match
@@ -449,7 +451,7 @@ object SymDenotations {
449451 end setAlias
450452
451453 def bounds (t : tpd.Tree ): TypeBounds = t match
452- case LambdaTypeTree (_ , body) =>
454+ case LambdaTypeTree (tparams , body) =>
453455 bounds(body)
454456 case TypeBoundsTree (lo, hi, alias) =>
455457 assert(! alias.isEmpty)
@@ -460,7 +462,7 @@ object SymDenotations {
460462 info match
461463 case TypeAlias (alias) if isOpaqueAlias && owner.isClass =>
462464 setAlias(alias)
463- HKTypeLambda .boundsFromParams(alias.typeParams , bounds(rhs))
465+ HKTypeLambda .boundsFromParams(tparams , bounds(rhs))
464466 case _ =>
465467 info
466468 end opaqueToBounds
0 commit comments