File tree 4 files changed +50
-0
lines changed
tests/analysis_tests/tests/src
4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
- Editor: Fix issue where pipe completions would not trigger with generic type arguments. https://github.com/rescript-lang/rescript/pull/7231
18
18
- Fix leftover assert false in code for ` null != undefined ` . https://github.com/rescript-lang/rescript/pull/7232
19
+ - Editor: Fix issue where completions would not show up inside of object bodies. https://github.com/rescript-lang/rescript/pull/7230
19
20
20
21
# 12.0.0-alpha.7
21
22
Original file line number Diff line number Diff line change @@ -1107,6 +1107,8 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor
1107
1107
if expr.pexp_loc |> Loc. hasPos ~pos: posNoWhite && ! result = None then (
1108
1108
setFound () ;
1109
1109
match expr.pexp_desc with
1110
+ | Pexp_extension ({txt = "obj" } , PStr [str_item ]) ->
1111
+ Ast_iterator. default_iterator.structure_item iterator str_item
1110
1112
| Pexp_extension ({txt} , _ ) -> setResult (CextensionNode txt)
1111
1113
| Pexp_constant _ -> setResult Cnone
1112
1114
| Pexp_ident lid ->
Original file line number Diff line number Diff line change
1
+ let x = Some (true )
2
+
3
+ let _ff = {
4
+ "one" : switch x {
5
+ | Some (true ) => "hello"
6
+ // |
7
+ // ^com
8
+ | _ => ""
9
+ },
10
+ }
Original file line number Diff line number Diff line change
1
+ Complete src/CompletionObjects.res 5:7
2
+ posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1]
3
+ posCursor:[5:7] posNoWhite:[5:5] Found expr:[2:10->9:1]
4
+ posCursor:[5:7] posNoWhite:[5:5] Found pattern:__ghost__[0:-1->7:5]
5
+ posCursor:[5:7] posNoWhite:[5:5] Found pattern:__ghost__[0:-1->7:5]
6
+ Completable: Cpattern Value[x]
7
+ Package opens Pervasives.JsxModules.place holder
8
+ ContextPath Value[x]
9
+ Path x
10
+ [{
11
+ "label": "None",
12
+ "kind": 12,
13
+ "tags": [],
14
+ "detail": "bool",
15
+ "documentation": null
16
+ }, {
17
+ "label": "Some(_)",
18
+ "kind": 12,
19
+ "tags": [],
20
+ "detail": "bool",
21
+ "documentation": null,
22
+ "insertText": "Some(${1:_})",
23
+ "insertTextFormat": 2
24
+ }, {
25
+ "label": "Some(true)",
26
+ "kind": 4,
27
+ "tags": [],
28
+ "detail": "bool",
29
+ "documentation": null
30
+ }, {
31
+ "label": "Some(false)",
32
+ "kind": 4,
33
+ "tags": [],
34
+ "detail": "bool",
35
+ "documentation": null
36
+ }]
37
+
You can’t perform that action at this time.
0 commit comments