Skip to content

Commit 3dcf300

Browse files
committed
fix reanalyze suggestions
1 parent 36c82b5 commit 3dcf300

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/syntax/src/res_core.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5495,12 +5495,12 @@ and parse_type_extension ~params ~attrs ~name p =
54955495
let constructors = loop p [first] in
54965496
Ast_helper.Te.mk ~attrs ~params ~priv name constructors
54975497

5498-
and parse_type_definitions ?current_type_name_path ?inline_types ~attrs ~name
5498+
and parse_type_definitions ~current_type_name_path ~inline_types ~attrs ~name
54995499
~params ~start_pos p =
55005500
let type_def =
55015501
let manifest, priv, kind =
5502-
parse_type_equation_and_representation ?current_type_name_path
5503-
?inline_types p
5502+
parse_type_equation_and_representation ~current_type_name_path
5503+
~inline_types p
55045504
in
55055505
let cstrs = parse_type_constraints p in
55065506
let loc = mk_loc start_pos p.prev_end_pos in

compiler/syntax/src/res_printer.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,11 +1624,11 @@ and print_label_declaration ?inline_record_definitions ~state
16241624
{ptyp_desc = Ptyp_constr ({txt = Lident constr_name}, _)} ) -> (
16251625
let record_definition =
16261626
inline_record_definitions
1627-
|> List.find (fun (r : Parsetree.type_declaration) ->
1627+
|> List.find_opt (fun (r : Parsetree.type_declaration) ->
16281628
r.ptype_name.txt = constr_name)
16291629
in
1630-
match record_definition.ptype_kind with
1631-
| Ptype_record lds ->
1630+
match record_definition with
1631+
| Some {ptype_kind = Ptype_record lds} ->
16321632
print_record_declaration ~inline_record_definitions ~state lds
16331633
cmt_tbl
16341634
| _ -> assert false)

0 commit comments

Comments
 (0)