Skip to content

Commit 724bf9c

Browse files
committed
Improve error message
1 parent 2177da5 commit 724bf9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
317317
if (tree.symbol.is(Unused) && !ctx.mode.is(Mode.Type)) {
318318
val msg =
319319
if (tree.symbol.is(CaseAccessor)) "First parameter list of case class may not contain `unused` parameters"
320-
else i"`unused` value $tree can only be used as unused arguments"
320+
else i"${tree.symbol} is declared as unused, but is in fact used"
321321
ctx.error(msg, tree.pos)
322322
}
323323
}

0 commit comments

Comments
 (0)