Version Information
- vyper Version (output of
vyper --version): 17322bb
What's your issue about?
Mixing a concat() call with a string literal in a DynArray initializer fails to compile, even though both values are valid String[32] elements.
@external
def foo():
x: DynArray[String[32], 10] = [concat("a", "a"), "bar"]
vyper.exceptions.InvalidLiteral: Array contains multiple, incompatible types
contract "test.vy:2", function "foo", line 2:32
1 def foo():
---> 2 x: DynArray[String[32], 10] = [concat("a", "a"), "bar"]
---------------------------------------^
3
Using two plain literals works fine:
x: DynArray[String[32], 10] = ["aa", "bar"] # compiles