Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodegenPanic for slice on empty(Bytes) #3987

Open
cyberthirst opened this issue May 1, 2024 · 0 comments
Open

CodegenPanic for slice on empty(Bytes) #3987

cyberthirst opened this issue May 1, 2024 · 0 comments

Comments

@cyberthirst
Copy link
Collaborator

Version Information

  • vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@commitish): 0.4.0rc3+commit.80708e6d

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant