Skip to content

Commit b7103fb

Browse files
committed
Fix #6826: Drop ExprType before getting the arg infos
1 parent cba756d commit b7103fb

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
@@ -1167,7 +1167,7 @@ trait Implicits { self: Typer =>
11671167
err.userDefinedErrorString(
11681168
raw,
11691169
pt.typeSymbol.typeParams.map(_.name.unexpandedName.toString),
1170-
pt.argInfos))
1170+
pt.widenExpr.argInfos))
11711171

11721172
def hiddenImplicitsAddendum: String = arg.tpe match {
11731173
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)