correction Unbound PRecord
This commit is contained in:
parent
9168e114c0
commit
e0bb403e11
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Reference in a new issue