We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0092d0 commit 7573959Copy full SHA for 7573959
typing/typetexp.ml
@@ -555,13 +555,10 @@ and transl_type_aux env policy styp =
555
{desc=Tconstr(p, tl, _)} -> Some(p, tl)
556
| _ -> None
557
in
558
- begin try
+ begin
559
(* 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
+ if Hashtbl.length hfields <> 0 then name := None
+ else name := nm
565
end;
566
let fl = match expand_head env cty.ctyp_type, nm with
567
{desc=Tvariant row}, _ when Btype.static_row row ->
0 commit comments