This commit is contained in:
Mylloon 2023-12-06 18:15:16 +01:00
parent 1f1e58f84f
commit bfb79a12ce
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -49,10 +49,12 @@ let rec check_pattern_linearity
and linearity_variable v vars =
if List.mem v.value vars
then
HopixTypes.type_error
v.position
"Il y a déjà une occurence de la variable dans le pattern"
then (
match v.value with
| Id i ->
HopixTypes.type_error
v.position
(Printf.sprintf "The variable %s has already appeared in this pattern." i))
else v.value :: vars
and linearity_pattern_list plist vars =