Skip to content

Commit

Permalink
add a hint
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Mar 14, 2024
1 parent 45960ef commit a7556d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vyper/builtins/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ def infer_arg_types(self, node, expected_return_typ=None):

# block conversions between same type
if target_type.compare_type(value_type):
raise InvalidType(f"Value and target type are both '{target_type}'", node)
raise InvalidType(
f"Value and target type are both `{target_type}`",
hint="try removing the call to `convert()`",
)

return [value_type, TYPE_T(target_type)]

Expand Down

0 comments on commit a7556d8

Please sign in to comment.