adding an nicer error message

This commit is contained in:
adelaett 2023-04-14 12:16:09 +02:00
parent 123ae9e4c1
commit 6b6272b0f2
No known key found for this signature in database
GPG Key ID: 367A8C08F513BD65

View File

@ -236,7 +236,10 @@ let rec trans_typ_keep (tau : typ) : typ =
| TTuple ts -> TTuple (List.map trans_typ_keep ts)
| TStruct s -> TStruct s
| TEnum en -> TEnum en
| TOption _ -> assert false
| TOption _ ->
Errors.raise_internal_error
"The type option should not appear before the dcalc -> lcalc \
translation step."
| TAny -> TAny
| TArray ts ->
TArray (TOption (trans_typ_keep ts), m) (* catala is not polymorphic *)