vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.83k stars 789 forks source link

CompilerPanic for concat on empty(Bytes) #3986

Open cyberthirst opened 3 months ago

cyberthirst commented 3 months ago

Version Information

Issue description

Certain contracts which contain empty and concat fail to compile with CompilerPanic.

POC

These contracts

#@version 0.4.0.rc3

@external
def foo():
    s: Bytes[63] = concat(empty(Bytes[31]), empty(bytes32))
#@version 0.4.0.rc3

@external
def foo():
    s: Bytes[63] = concat(empty(Bytes[31]), b"a")

fail to compile with:

vyper.exceptions.CompilerPanic: tried to modify non-pointer type

credits: @trocher