We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b9b913 commit 4b39c6fCopy full SHA for 4b39c6f
compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
@@ -729,7 +729,7 @@ object CheckUnused:
729
if selector.isGiven then
730
// Further check that the symbol is a given or implicit and conforms to the bound
731
sym.isOneOf(Given | Implicit)
732
- && (selector.bound.isEmpty || sym.info <:< selector.boundTpe)
+ && (selector.bound.isEmpty || sym.info.finalResultType <:< selector.boundTpe)
733
else
734
// Normal wildcard, check that the symbol is not a given (but can be implicit)
735
!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