Skip to content

Can we have "did you mean..." for top-level names rather than just methods #18682

Closed
@lihaoyi

Description

@lihaoyi

Compiler version

3.3.1

Minimized example

Mis-typing a method results in a nice suggestion, presumably using Levenshtein distance or something:

Screenshot 2023-10-12 at 10 51 10 PM

But mis-typing a free variable name doesn't:

Screenshot 2023-10-12 at 10 50 48 PM

Could we make mis-typed top level names give nice suggestions too? Presumably we already know everything that is in scope, and can do a Levenshtein distance comparison to find any that look close enough to suggest

Metadata

Metadata

Assignees

Labels

area:reportingError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions