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.
1 parent cba756d commit af6f913Copy full SHA for af6f913
compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -1067,7 +1067,7 @@ trait Implicits { self: Typer =>
1067
}
1068
val base = baseWithRefinements(formal)
1069
val result =
1070
- if (base <:< formal) {
+ if (base <:< formal.widenExpr) {
1071
// With the subtype test we enforce that the searched type `formal` is of the right form
1072
handler(base, span)(ctx)
1073
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