correction Unbound PRecord

This commit is contained in:
Nicolas PENELOUX 2023-12-06 17:23:45 +01:00
parent 9168e114c0
commit e0bb403e11

View file

@ -269,7 +269,10 @@ and pattern_record
let label = fst(List.hd plist) in
let type_cons,_,labels =
let LId label_name = label.value in
HopixTypes.lookup_type_constructor_of_label label.position label.value tenv
try HopixTypes.lookup_type_constructor_of_label label.position label.value tenv with
| HopixTypes.Unbound (pos, Label (LId i)) ->
HopixTypes.type_error pos (Printf.sprintf "There is no type definition for label `%s'." label_name )
(* Printf.sprintf "erreur message ici"*)
in