Skip to content

Commit 2e4d949

Browse files
committed
Add failing test for Stdlib.null<'a> and Stdlib.nullable<'a> completion
1 parent 9ce1432 commit 2e4d949

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
let x: null<unit> = Stdlib_Null.null
2+
3+
// x.
4+
// ^com
5+
6+
let y: nullable<unit> = null
7+
8+
// y.
9+
// ^com
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Complete src/CompletionNullNullable.res 2:5
2+
posCursor:[2:5] posNoWhite:[2:4] Found expr:[2:3->2:5]
3+
Pexp_field [2:3->2:4] _:[5:0->2:5]
4+
Completable: Cpath Value[x].""
5+
Package opens Stdlib.place holder Pervasives.JsxModules.place holder
6+
Resolved opens 1 Stdlib
7+
ContextPath Value[x].""
8+
ContextPath Value[x]
9+
Path x
10+
ContextPath Value[x]->
11+
ContextPath Value[x]
12+
Path x
13+
CPPipe pathFromEnv:Primitive_js_extern found:false
14+
Path Primitive_js_extern.
15+
Path
16+
[]
17+
18+
Complete src/CompletionNullNullable.res 7:5
19+
posCursor:[7:5] posNoWhite:[7:4] Found expr:[7:3->7:5]
20+
Pexp_field [7:3->7:4] _:[10:0->7:5]
21+
Completable: Cpath Value[y].""
22+
Package opens Stdlib.place holder Pervasives.JsxModules.place holder
23+
Resolved opens 1 Stdlib
24+
ContextPath Value[y].""
25+
ContextPath Value[y]
26+
Path y
27+
ContextPath Value[y]->
28+
ContextPath Value[y]
29+
Path y
30+
CPPipe pathFromEnv:Primitive_js_extern found:false
31+
Path Primitive_js_extern.
32+
Path
33+
[{
34+
"label": "->Primitive_js_extern.isNullable",
35+
"kind": 12,
36+
"tags": [],
37+
"detail": "nullable<'a> => bool",
38+
"documentation": null,
39+
"sortText": "isNullable",
40+
"insertText": "->Primitive_js_extern.isNullable",
41+
"additionalTextEdits": [{
42+
"range": {"start": {"line": 7, "character": 4}, "end": {"line": 7, "character": 5}},
43+
"newText": ""
44+
}]
45+
}]
46+

0 commit comments

Comments
 (0)