Skip to content

Commit

Permalink
fix displaying of ArgumentException (vyperlang#3500)
Browse files Browse the repository at this point in the history
The change is pretty self-explanatory.
```vyper
@internal
@view
def bar():
    pass

@external
def foo():
    self.bar(12)
```
Was failing to compile with:
`vyper.exceptions.ArgumentException: Invalid argument count for call to 'bar': expected 0 to 0, got 1`

And now fail to compile with:

`vyper.exceptions.ArgumentException: Invalid argument count for call to 'bar': expected 0, got 1`

Co-authored-by: Tanguy Rocher <tanguy.rocher@protonmail.com>
  • Loading branch information
trocher and Tanguy Rocher authored Jul 16, 2023
1 parent 5dc3ac7 commit 91d6e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vyper/ast/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def validate_call_args(
arg_count = (arg_count[0], 2**64)

if arg_count[0] == arg_count[1]:
arg_count == arg_count[0]
arg_count = arg_count[0]

if isinstance(node.func, vy_ast.Attribute):
msg = f" for call to '{node.func.attr}'"
Expand Down

0 comments on commit 91d6e24

Please sign in to comment.