Skip to content

Commit 0ea3bab

Browse files
committed
Change sample
1 parent 9098b74 commit 0ea3bab

File tree

3 files changed

+46
-567
lines changed

3 files changed

+46
-567
lines changed

analysis/src/CompletionFrontEnd.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,10 +1148,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor
11481148
(* Determine the field name if present *)
11491149
let fieldName =
11501150
match fieldExpr.pexp_desc with
1151-
| Pexp_ident {txt = Lident fieldName}
1152-
when Res_parsetree_viewer.is_tagged_template_literal innerExpr
1153-
->
1154-
fieldName
1151+
| Pexp_ident {txt = Lident fieldName} -> fieldName
11551152
(* This is likely to be an exprhole *)
11561153
| _ -> ""
11571154
in
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
module M = {
2+
type t
3+
4+
let a = (_t:t) => 4
5+
let b = (_:t) => "c"
6+
let xyz = (_:t, p:int) => p + 1
7+
}
8+
19
@module("meh") @taggedTemplate
2-
external meh: (array<string>, array<string>) => string = "default"
10+
external meh: (array<string>, array<string>) => M.t = "default"
311

412
// let x = meh`foo`.
513
// ^com
614

7-
// let y = meh`bar`.len
8-
// ^com
15+
// let y = meh`bar`.x
16+
// ^com

0 commit comments

Comments
 (0)