Skip to content

Commit 2380ad0

Browse files
committed
add test where hover is not expanded as contents has not been saved
1 parent 80eb9ef commit 2380ad0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

analysis/tests/src/Hover.res

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,11 @@ type useR = {x: int, y: list<option<r<float>>>}
202202

203203
let testUseR = (v: useR) => v
204204
// ^hov
205+
206+
let usr: useR = {
207+
x: 123,
208+
y: list{},
209+
}
210+
211+
// let f = usr
212+
// ^hov

analysis/tests/src/expected/Hover.res.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,10 @@ Hover src/Hover.res 197:4
164164
Hover src/Hover.res 202:16
165165
{"contents": "```rescript\nuseR\n```\n\n\n```\n \n```\n```rescript\ntype useR = {x: int, y: list<option<r<float>>>}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C200%2C0%5D)\n\n---\n\n\n\n```\n \n```\n```rescript\ntype r<'a> = {i: 'a, f: float}\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C101%2C0%5D)\n\n---\n"}
166166

167+
Hover src/Hover.res 210:13
168+
Nothing at that position. Now trying to use completion.
169+
posCursor:[210:13] posNoWhite:[210:12] Found expr:[210:11->210:14]
170+
Pexp_ident usr:[210:11->210:14]
171+
Completable: Cpath Value[usr]
172+
{"contents": "```rescript\nuseR\n```"}
173+

0 commit comments

Comments
 (0)