@@ -425,7 +425,7 @@ class Namer { typer: Typer =>
425
425
* is still missing its parents. Parents are set to Nil when completion starts and are
426
426
* set to the actual parents later. If a superclass completes a subclass in one
427
427
* of its parents, the parents of the superclass or some intervening class might
428
- * not yet be set. This situation can be detected by asking for the baseType of Any -
428
+ * not yet be set. This situation can be detected by asking for the baseType of Any -
429
429
* if that type does not exist, one of the base classes of this class misses its parents.
430
430
* If this situation arises, the computation of the superclass might be imprecise.
431
431
* For instance, in i12722.scala, the superclass of `IPersonalCoinOps` is computed
@@ -988,9 +988,12 @@ class Namer { typer: Typer =>
988
988
val unsafeInfo = if (isDerived) rhsBodyType else abstracted(rhsBodyType)
989
989
990
990
def opaqueToBounds (info : Type ): Type =
991
- if sym.isOpaqueAlias && info.typeParams.nonEmpty && info.hkResult.typeParams.nonEmpty then
992
- report.error(em " opaque type alias cannot have multiple type parameter lists " , rhs.srcPos)
993
- sym.opaqueToBounds(info, rhs1, tparamSyms)
991
+ if sym.isOpaqueAlias then
992
+ if info.typeParams.nonEmpty && info.hkResult.typeParams.nonEmpty then
993
+ report.error(em " opaque type alias cannot have multiple type parameter lists " , rhs.srcPos)
994
+ sym.opaqueToBounds(info, rhs1, tparamSyms)
995
+ else
996
+ info
994
997
995
998
if (isDerived) sym.info = unsafeInfo
996
999
else {
0 commit comments