vyperlang / vyper

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

CodegenPanic for slice on empty(Bytes) #3987

Open cyberthirst opened 3 months ago

cyberthirst commented 3 months ago

Version Information

Issue description

Certain contracts which contain empty and slice fail to compile.

POC

This contract

#@version 0.4.0.rc3

@external
def foo():
    s: Bytes[2] = slice(empty(Bytes[4]), 0, 2)

fails to compile with:

vyper.exceptions.CodegenPanic: unhandled exception ~empty <empty(Bytes[4])>, parse_Call

credits: @trocher