We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9ca1d0a + 3677eaf commit f4bde0bCopy full SHA for f4bde0b
compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
@@ -728,7 +728,7 @@ object CheckUnused:
728
if selector.isGiven then
729
// Further check that the symbol is a given or implicit and conforms to the bound
730
sym.isOneOf(Given | Implicit)
731
- && (selector.bound.isEmpty || sym.info <:< selector.boundTpe)
+ && (selector.bound.isEmpty || sym.info.finalResultType <:< selector.boundTpe)
732
else
733
// Normal wildcard, check that the symbol is not a given (but can be implicit)
734
!sym.is(Given)
tests/pos/i20860.scala
@@ -0,0 +1,3 @@
1
+def `i20860 use result to check selector bound`: Unit =
2
+ import Ordering.Implicits.given Ordering[?]
3
+ summon[Ordering[Seq[Int]]]
0 commit comments