You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vyper incorrectly reports the location of a type error when performing invalid operations on DynArrays. The error points to a constant declaration instead of the actual operation causing the error.
The error should point to line 7 where the actual DynArray addition data1 + data2 is performed.
Actual Behavior:
The error incorrectly points to line 2 at the constant declaration MAX1 + 1, which is a valid uint256 addition operation and not the source of the error.
Error output:
vyper.exceptions.InvalidOperation: Cannot perform addition on DynArray[address, 10]
contract "test.vy:2", function "foo", line 2:26
1 MAX1: constant(uint256) = 10
---> 2 MAX2: constant(uint256) = MAX1 + 2
---------------------------------^
3
The text was updated successfully, but these errors were encountered:
Version Information
vyper --version
): 0.4.1python --version
): 3.12What's your issue about?
Vyper incorrectly reports the location of a type error when performing invalid operations on DynArrays. The error points to a constant declaration instead of the actual operation causing the error.
Given the follow contract:
Expected Behavior:
The error should point to line 7 where the actual DynArray addition data1 + data2 is performed.
Actual Behavior:
The error incorrectly points to line 2 at the constant declaration MAX1 + 1, which is a valid uint256 addition operation and not the source of the error.
Error output:
The text was updated successfully, but these errors were encountered: