Skip to content

Commit

Permalink
Only support one argument in case order matters
Browse files Browse the repository at this point in the history
  • Loading branch information
SF-N committed Mar 13, 2024
1 parent e479b96 commit b7fdc68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gt4py/next/type_system/type_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,11 @@ def function_signature_incompatibilities_field(
if len(args) < 1: # Todo: is this the right condition in general?
yield f"Function takes at least 1 argument, but {len(args)} were given."
return
if len(args) > 1:
for arg in args:
if arg.source.value != arg.target[0].value:
yield f"Function takes only 1 argument in unstructured case, but {len(args)} were given."
return

if not isinstance(args[0], ts.OffsetType):
yield f"Expected first argument to be of type '{ts.OffsetType}', got '{args[0]}'."
Expand Down

0 comments on commit b7fdc68

Please sign in to comment.