Skip to content

Commit 41c19c3

Browse files
committed
Improve error message
1 parent 2afb505 commit 41c19c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ object messages {
15751575
private val varNote =
15761576
if (sym.is(Mutable)) "Note that variables need to be initialized to be defined."
15771577
else ""
1578-
val msg = hl"""only classes can have declared but undefined members"""
1578+
val msg = hl"""declaration of $sym not allowed here: only classes can have declared but undefined members"""
15791579
val kind = "Syntax"
15801580
val explanation = s"$varNote"
15811581
}

0 commit comments

Comments
 (0)