test-46
This commit is contained in:
parent
1f1e58f84f
commit
bfb79a12ce
1 changed files with 6 additions and 4 deletions
|
@ -49,10 +49,12 @@ let rec check_pattern_linearity
|
||||||
|
|
||||||
and linearity_variable v vars =
|
and linearity_variable v vars =
|
||||||
if List.mem v.value vars
|
if List.mem v.value vars
|
||||||
then
|
then (
|
||||||
HopixTypes.type_error
|
match v.value with
|
||||||
v.position
|
| Id i ->
|
||||||
"Il y a déjà une occurence de la variable dans le pattern"
|
HopixTypes.type_error
|
||||||
|
v.position
|
||||||
|
(Printf.sprintf "The variable %s has already appeared in this pattern." i))
|
||||||
else v.value :: vars
|
else v.value :: vars
|
||||||
|
|
||||||
and linearity_pattern_list plist vars =
|
and linearity_pattern_list plist vars =
|
||||||
|
|
Reference in a new issue