Skip to content

Commit c809a55

Browse files
authored
Merge pull request #6827 from dotty-staging/fix-#6826
Fix #6826: Drop ExprType before getting the arg infos
2 parents 74fce2e + b7103fb commit c809a55

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ trait Implicits { self: Typer =>
11611161
err.userDefinedErrorString(
11621162
raw,
11631163
pt.typeSymbol.typeParams.map(_.name.unexpandedName.toString),
1164-
pt.argInfos))
1164+
pt.widenExpr.argInfos))
11651165

11661166
def hiddenImplicitsAddendum: String = arg.tpe match {
11671167
case fail: SearchFailureType =>

tests/neg/i6826.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Foo {
2+
inline def foo[T](implicit ct: =>scala.reflect.ClassTag[T]): Unit = Unit
3+
type U
4+
foo[U] // error
5+
}

0 commit comments

Comments
 (0)