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

bug: in and not in cannot be used with dynamic array of enums #3522

Open
tserg opened this issue Jul 19, 2023 · 0 comments · May be fixed by #3526
Open

bug: in and not in cannot be used with dynamic array of enums #3522

tserg opened this issue Jul 19, 2023 · 0 comments · May be fixed by #3526

Comments

@tserg
Copy link
Collaborator

tserg commented Jul 19, 2023

Version Information

  • vyper Version (output of vyper --version): 9e3b9a2
  • OS: linux
  • Python Version (output of python --version): 3.10.4

What's your issue about?

When trying to use the in or not in operator with a dynamic array of enum, compilation fails with a TypeMismatch exception:

enum A:
    a
    b

@external
def foo():
    f: DynArray[A, 12] = []
    b: bool = A.a in f

h/t @trocher

How can it be fixed?

Fill this in if you know how to fix it.

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

Successfully merging a pull request may close this issue.

1 participant