Skip to content

Commit 62a5707

Browse files
committed
Improve error message
1 parent 278d212 commit 62a5707

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
@@ -1577,7 +1577,7 @@ object messages {
15771577
private val varNote =
15781578
if (sym.is(Mutable)) "Note that variables need to be initialized to be defined."
15791579
else ""
1580-
val msg = hl"""only classes can have declared but undefined members"""
1580+
val msg = hl"""declaration of $sym not allowed here: only classes can have declared but undefined members"""
15811581
val kind = "Syntax"
15821582
val explanation = s"$varNote"
15831583
}

0 commit comments

Comments
 (0)