Skip to content

Commit c8d9a00

Browse files
committed
Make opaque types work with new formulation of isMatch
1 parent 2d852d7 commit c8d9a00

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ object SymDenotations {
432432
TypeBounds.empty
433433

434434
info match
435-
case TypeAlias(alias) if isOpaqueAlias && owner.isClass =>
436-
setAlias(alias)
435+
case info: AliasingBounds if isOpaqueAlias && owner.isClass =>
436+
setAlias(info.alias)
437437
HKTypeLambda.boundsFromParams(tparams, bounds(rhs))
438438
case _ =>
439439
info

tests/pos/i12194-opaque.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
opaque type ProductK[F[_], T <: Tuple] = Tuple.Map[T, F]
2+
object ProductK:
3+
def of[F[_], T <: Tuple](t: Tuple.Map[T, F]): ProductK[F, T] = t

0 commit comments

Comments
 (0)