Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2107,17 +2107,17 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
}

override def gadtBounds(sym: Symbol)(implicit ctx: Context): TypeBounds = {
footprint += sym.typeRef
if (sym.exists) footprint += sym.typeRef
super.gadtBounds(sym)
}

override def gadtAddLowerBound(sym: Symbol, b: Type): Boolean = {
footprint += sym.typeRef
if (sym.exists) footprint += sym.typeRef
super.gadtAddLowerBound(sym, b)
}

override def gadtAddUpperBound(sym: Symbol, b: Type): Boolean = {
footprint += sym.typeRef
if (sym.exists) footprint += sym.typeRef
super.gadtAddUpperBound(sym, b)
}

Expand Down
9 changes: 9 additions & 0 deletions tests/pos/dep-match.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
object Test {
type Foo = Int { type U }
type Bar[T] = T match {
case Unit => Unit
}
inline def baz(foo: Foo): Unit = {
val v: Bar[foo.U] = ???
}
}