Check for repeated argument names to functions

(PT-159592825)
This commit is contained in:
Ulf Norell
2019-05-10 14:04:01 +02:00
parent 23cc8e1132
commit e1a798aef4
3 changed files with 16 additions and 1 deletions
+2
View File
@@ -191,6 +191,8 @@ failing_contracts() ->
" - r' (at line 5, column 10)">>,
<<"Repeated name x in pattern\n"
" x :: x (at line 26, column 7)">>,
<<"Repeated argument x to function repeated_arg (at line 44, column 12).">>,
<<"Repeated argument y to function repeated_arg (at line 44, column 12).">>,
<<"No record type with fields y, z (at line 14, column 22)">>,
<<"The field z is missing when constructing an element of type r2 (at line 15, column 24)">>,
<<"Record type r2 does not have field y (at line 15, column 22)">>]}
+2
View File
@@ -40,3 +40,5 @@ contract Test =
function type_error(r, x) =
set_x(set_x(x, r), x)
function repeated_arg(x : int, y, x : string, y : bool) : string = x