Skip to content

Commit 70535c8

Browse files
committed
Fix bug in error message
Used to print: <none> does not take parameters.
1 parent 573b664 commit 70535c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/reporting/diagnostic/messages.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,9 @@ object messages {
13631363

13641364
val msg: String = {
13651365
val more = if (tree.isInstanceOf[tpd.Apply]) " more" else ""
1366-
em"${methodSymbol.showLocated} does not take$more parameters"
1366+
val meth = methodSymbol
1367+
val methStr = if (meth.exists) methodSymbol.showLocated else "expression"
1368+
em"$methStr does not take$more parameters"
13671369
}
13681370

13691371
val explanation: String = {

0 commit comments

Comments
 (0)