Skip to content

Commit e11c91a

Browse files
committed
Clarify error for unbound identifier
1 parent d3ccc48 commit e11c91a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,14 @@ object messages {
194194

195195
case class MissingIdent(tree: untpd.Ident, treeKind: String, name: String)(implicit ctx: Context)
196196
extends Message(6) {
197-
val kind = "Missing Identifier"
197+
val kind = "Unbound Identifier"
198198
val msg = em"not found: $treeKind$name"
199199

200200
val explanation = {
201-
hl"""|An identifier for `$treeKind$name` is missing. This means that something
202-
|has either been misspelt or you're forgetting an import"""
201+
hl"""|The identifier for `$treeKind$name` is not bound, that is,
202+
|no declaration for this identifier can be found.
203+
|That can happen for instance if $name or its declaration has either been
204+
|misspelt, or if you're forgetting an import"""
203205
}
204206
}
205207

0 commit comments

Comments
 (0)