Skip to content

Commit ab851a0

Browse files
committed
cleanup
1 parent 9af643f commit ab851a0

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

analysis/src/CompletionBackEnd.ml

-6
Original file line numberDiff line numberDiff line change
@@ -2086,8 +2086,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
20862086
{
20872087
env;
20882088
definition = `NameOnly "jsxConfig";
2089-
path = None;
2090-
attributes = [];
20912089
fields =
20922090
[
20932091
mkField ~name:"version" ~primitive:Predef.path_int;
@@ -2117,8 +2115,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
21172115
Trecord
21182116
{
21192117
env;
2120-
path = None;
2121-
attributes = [];
21222118
definition = `NameOnly "importAttributesConfig";
21232119
fields = [mkField ~name:"type_" ~primitive:Predef.path_string];
21242120
}
@@ -2127,8 +2123,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
21272123
Trecord
21282124
{
21292125
env;
2130-
path = None;
2131-
attributes = [];
21322126
definition = `NameOnly "moduleConfig";
21332127
fields =
21342128
[

analysis/src/SharedTypes.ml

-2
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,6 @@ and completionType =
354354
| Trecord of {
355355
env: QueryEnv.t;
356356
fields: field list;
357-
path: Path.t option;
358-
attributes: Parsetree.attributes;
359357
definition:
360358
[ `NameOnly of string
361359
(** When we only have the name, like when pulling the record from a declared type. *)

analysis/src/TypeUtils.ml

+3-20
Original file line numberDiff line numberDiff line change
@@ -383,23 +383,14 @@ let rec extractType ?(printOpeningDebug = true)
383383
variantDecl = decl;
384384
},
385385
typeArgContext )
386-
| Some
387-
(envFromDeclaration, {item = {kind = Record fields; decl; attributes}})
388-
->
386+
| Some (envFromDeclaration, {item = {kind = Record fields; decl}}) ->
389387
if Debug.verbose () then print_endline "[extract_type]--> found record";
390388
(* Need to create a new type arg context here because we're sending along a type expr that might have type vars. *)
391389
let typeArgContext =
392390
maybeSetTypeArgCtx ~typeParams:decl.type_params ~typeArgs env
393391
in
394392
Some
395-
( Trecord
396-
{
397-
env = envFromDeclaration;
398-
path = Some path;
399-
fields;
400-
definition = `TypeExpr t;
401-
attributes;
402-
},
393+
( Trecord {env = envFromDeclaration; fields; definition = `TypeExpr t},
403394
typeArgContext )
404395
| Some (envFromDeclaration, {item = {name = "t"; decl = {type_params}}}) ->
405396
let typeArgContext =
@@ -580,15 +571,7 @@ let extractTypeFromResolvedType (typ : Type.t) ~env ~full =
580571
match typ.kind with
581572
| Tuple items -> Some (Tuple (env, items, Ctype.newty (Ttuple items)))
582573
| Record fields ->
583-
Some
584-
(Trecord
585-
{
586-
env;
587-
fields;
588-
path = None;
589-
definition = `NameOnly typ.name;
590-
attributes = typ.attributes;
591-
})
574+
Some (Trecord {env; fields; definition = `NameOnly typ.name})
592575
| Variant constructors ->
593576
Some
594577
(Tvariant

0 commit comments

Comments
 (0)