This PR scans the environment for viable replacements for a dotted identifier (like `.zero`) and suggests concrete alternatives as replacements. ## Example ``` #example .zero ``` Error message: ``` Invalid dotted identifier notation: The expected type of `.cons` could not be determined ``` Additional hint added by this PR: ``` Hint: Using one of these would be unambiguous: [apply] `BitVec.cons` [apply] `List.cons` [apply] `List.Lex.cons` [apply] `List.Pairwise.cons` [apply] `List.Perm.cons` [apply] `List.Sublist.cons` [apply] `List.Lex.below.cons` [apply] `List.Pairwise.below.cons` [apply] `List.Perm.below.cons` [apply] `List.Sublist.below.cons` [apply] `Lean.Grind.AC.Seq.cons` ``` ## Additional changes This PR also brings several related error message descriptions and code actions more in line with each other, changing several "Suggested replacement: " code actions to the more common "Change to " wording, and sorts suggestions obtained from searching the context by the default sort for Names (which prefers names with fewer segments).
8 lines
300 B
Text
8 lines
300 B
Text
1719.lean:2:8-2:12: error(lean.invalidDottedIdent): Invalid dotted identifier notation: The expected type of `.inl` could not be determined
|
|
|
|
Hint: Using one of these would be unambiguous:
|
|
[apply] `Or.inl`
|
|
[apply] `PSum.inl`
|
|
[apply] `Sum.inl`
|
|
[apply] `Sum.Lex.inl`
|
|
[apply] `Sum.LiftRel.inl`
|