Open
Description
Compiler version
3.3.6 through latest nightly 3.7.2-RC1-bin-20250523-ee14905-NIGHTLY
Minimized code
trait Show[A] { def apply(a: A): String }
object Show {
given str[S <: String]: Show[S] = s => s
}
case class Test()
summon[Show[Test]]
Output
-- [E172] Type Error: ----------------------------------------------------------
8 |summon[Show[Test]]
| ^
|No given instance of type Show[Test] was found for parameter x of method summon in object Predef.
|I found:
|
| Show.str[S]
|
|But given instance str in object Show does not match type Show[Test].
Expectation
Show.str
should not be considered or reported as part of the implicit search for Show[Test]
since Test
is not a subtype of String