Skip to content

Commit ac68e97

Browse files
committed
Use parameter span for type match _
1 parent 5eae7f4 commit ac68e97

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,14 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
444444
case _ => tree
445445
}
446446
case tree: Ident =>
447+
def span =
448+
if (tree.name == nme.WILDCARD) tree.span // From type match
449+
else paramSpan(tree.name)
447450
paramProxy.get(tree.tpe) match {
448451
case Some(t) if tree.isTerm && t.isSingleton =>
449-
singleton(t.dealias).withSpan(paramSpan(tree.name))
452+
singleton(t.dealias).withSpan(span)
450453
case Some(t) if tree.isType =>
451-
TypeTree(t).withSpan(paramSpan(tree.name))
454+
TypeTree(t).withSpan(span)
452455
case _ => tree
453456
}
454457
case tree => tree

0 commit comments

Comments
 (0)