Skip to content
Open
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
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Implicits.scala
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ trait ImplicitRunInfo:
WildcardType
else
seen += t
t.superType match
t.underlying match
case TypeBounds(lo, hi) =>
if lo.isBottomTypeAfterErasure then apply(hi)
else AndType.make(apply(lo), apply(hi))
Expand Down
12 changes: 12 additions & 0 deletions tests/pos/i21951b.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

class A
object A:
given A = ???

class B[X]
object B:
given g[T]: B[T] = ???

object Test:
def foo[X >: A] = summon[X] // was error
def bar[F[T] >: B[T]] = summon[F[Int]] // was error
Loading