Skip to content

Commit 0011f44

Browse files
committed
Ensure Array and Var parameters are right
When invoking a function check also their arguments (var, arrays) matches correctly.
1 parent 93358bb commit 0011f44

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/check.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ def check_call_arguments(lineno, id_, args):
105105
return False
106106

107107
for arg, param in zip(args, entry.params):
108+
if arg.class_ in (CLASS.var, CLASS.array) and param.class_ != arg.class_:
109+
syntax_error(lineno, "Invalid argument '{}'".format(arg.value))
110+
return None
111+
108112
if not arg.typecast(param.type_):
109113
return False
110114

0 commit comments

Comments
 (0)