We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec59536 + af6f913 commit d0d43f8Copy full SHA for d0d43f8
compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -1086,7 +1086,7 @@ trait Implicits { self: Typer =>
1086
}
1087
val base = baseWithRefinements(formal)
1088
val result =
1089
- if (base <:< formal) {
+ if (base <:< formal.widenExpr) {
1090
// With the subtype test we enforce that the searched type `formal` is of the right form
1091
handler(base, span)(ctx)
1092
tests/pos/i6828.scala
@@ -0,0 +1,5 @@
1
+class Foo {
2
+ inline def foo[T](implicit ct: =>scala.reflect.ClassTag[T]): Unit = Unit
3
+ foo[Int]
4
+ foo[String]
5
+}
0 commit comments