Skip to content

Commit 7573959

Browse files
committed
small tweak
1 parent b0092d0 commit 7573959

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

typing/typetexp.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,13 +555,10 @@ and transl_type_aux env policy styp =
555555
{desc=Tconstr(p, tl, _)} -> Some(p, tl)
556556
| _ -> None
557557
in
558-
begin try
558+
begin
559559
(* Set name if there are no fields yet *)
560-
Hashtbl.iter (fun _ _ -> raise Exit) hfields;
561-
name := nm
562-
with Exit ->
563-
(* Unset it otherwise *)
564-
name := None
560+
if Hashtbl.length hfields <> 0 then name := None
561+
else name := nm
565562
end;
566563
let fl = match expand_head env cty.ctyp_type, nm with
567564
{desc=Tvariant row}, _ when Btype.static_row row ->

0 commit comments

Comments
 (0)