Skip to content

Commit f962dd0

Browse files
committed
fix reanalyze suggestions
1 parent 2b11cd4 commit f962dd0

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
@@ -5580,12 +5580,12 @@ and parse_type_extension ~params ~attrs ~name p =
55805580
let constructors = loop p [first] in
55815581
Ast_helper.Te.mk ~attrs ~params ~priv name constructors
55825582

5583-
and parse_type_definitions ?current_type_name_path ?inline_types ~attrs ~name
5583+
and parse_type_definitions ~current_type_name_path ~inline_types ~attrs ~name
55845584
~params ~start_pos p =
55855585
let type_def =
55865586
let manifest, priv, kind =
5587-
parse_type_equation_and_representation ?current_type_name_path
5588-
?inline_types p
5587+
parse_type_equation_and_representation ~current_type_name_path
5588+
~inline_types p
55895589
in
55905590
let cstrs = parse_type_constraints p in
55915591
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
@@ -1626,11 +1626,11 @@ and print_label_declaration ?inline_record_definitions ~state
16261626
{ptyp_desc = Ptyp_constr ({txt = Lident constr_name}, _)} ) -> (
16271627
let record_definition =
16281628
inline_record_definitions
1629-
|> List.find (fun (r : Parsetree.type_declaration) ->
1629+
|> List.find_opt (fun (r : Parsetree.type_declaration) ->
16301630
r.ptype_name.txt = constr_name)
16311631
in
1632-
match record_definition.ptype_kind with
1633-
| Ptype_record lds ->
1632+
match record_definition with
1633+
| Some {ptype_kind = Ptype_record lds} ->
16341634
print_record_declaration ~inline_record_definitions ~state lds
16351635
cmt_tbl
16361636
| _ -> assert false)

0 commit comments

Comments
 (0)