Skip to content

Commit 585fe2a

Browse files
committed
Rename+refactor getConstr to make it clear type instantiation is not required.
1 parent b5f6d48 commit 585fe2a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

analysis/src/CompletionBackEnd.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,17 +1304,17 @@ let rec getCompletionsForContextPath ~package ~opens ~rawOpens ~allFiles ~pos
13041304
| _ :: rest -> List.rev rest
13051305
| [] -> [])
13061306
in
1307-
let getConstr typ =
1307+
let getConstrPath typ =
13081308
match typ.Types.desc with
1309-
| Tconstr (path, _, _)
1310-
| Tlink {desc = Tconstr (path, _, _)}
1311-
| Tsubst {desc = Tconstr (path, _, _)}
1312-
| Tpoly ({desc = Tconstr (path, _, _)}, []) ->
1309+
| Tconstr (path, _typeArgs, _)
1310+
| Tlink {desc = Tconstr (path, _typeArgs, _)}
1311+
| Tsubst {desc = Tconstr (path, _typeArgs, _)}
1312+
| Tpoly ({desc = Tconstr (path, _typeArgs, _)}, []) ->
13131313
Some path
13141314
| _ -> None
13151315
in
13161316
let fromType typ =
1317-
match getConstr typ with
1317+
match getConstrPath typ with
13181318
| None -> None
13191319
| Some path -> Some (getModulePath path)
13201320
in

0 commit comments

Comments
 (0)