vyper icon indicating copy to clipboard operation
vyper copied to clipboard

Unable to declare a static array of DynArray's

Open AntonD3 opened this issue 3 years ago • 1 comments

Version Information

  • vyper Version (output of vyper --version): 0.3.3

What's your issue about?

I am not sure that it should be supported, but I got the next error:

vyper-0.3.3 error: vyper.exceptions.StructureException: DynArray must be defined with base type and max length, e.g. DynArray[bool, 5]
  contract "tests/vyper/external/abiEncoderV2/calldata_array.vy", function "f", line 13:9 
       12 @view
  ---> 13 def f(s: DynArray[uint256, 10][1]) -> bool:
  -----------------^
       14     a: Bytes[400] = Self(self).g(s[0])

[13246] Failed to execute script 'vyper_compile' due to unhandled exception!

Source code:

@external
@pure
def f(s: DynArray[uint256, 10][1]) -> bool:
    return True
    

AntonD3 avatar Aug 08 '22 15:08 AntonD3

this should have been fixed in 0.3.4: https://github.com/vyperlang/vyper/pull/2953

tserg avatar Aug 08 '22 16:08 tserg