-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't issue atomic id completions when there is a dangling dot
- Loading branch information
Showing
3 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Regression test for a bug where the dangling dot was not accounted for in some | ||
-- atomic completions, which lead to invalid completions after a dangling dot | ||
|
||
def foo : Unit := | ||
x. -- No completions expected | ||
--^ textDocument/completion | ||
|
||
def bar : Array Nat := Id.run do | ||
let mut x := sorry | ||
let foo := x. -- No completions expected | ||
--^ textDocument/completion | ||
sorry |
6 changes: 6 additions & 0 deletions
6
tests/lean/interactive/completionDanglingDot.lean.expected.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{"textDocument": {"uri": "file:///completionDanglingDot.lean"}, | ||
"position": {"line": 4, "character": 4}} | ||
{"items": [], "isIncomplete": true} | ||
{"textDocument": {"uri": "file:///completionDanglingDot.lean"}, | ||
"position": {"line": 9, "character": 15}} | ||
{"items": [], "isIncomplete": true} |