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: array of different types can be folded #3442

Closed
tserg opened this issue May 23, 2023 · 1 comment
Closed

bug: array of different types can be folded #3442

tserg opened this issue May 23, 2023 · 1 comment

Comments

@tserg
Copy link
Collaborator

tserg commented May 23, 2023

Version Information

  • vyper Version (output of vyper --version): 95bf73f
  • OS: linux
  • Python Version (output of python --version): 3.10.8

What's your issue about?

The first statement compiles even though there is a type mismatch in the literal array. It should fail compilation like the second statement.

@external
def foo():
    a: uint256 = [max_value(decimal), max_value(uint256)][1] # compiles  
    b: uint256 = [1.0, max_value(uint256)][1]

h/t @trocher @ptrcarta

How can it be fixed?

Fill this in if you know how to fix it.

@trocher
Copy link
Contributor

trocher commented Feb 19, 2024

The issue is no longer there in 4b4e188, the example above fails compilation. Was removed by the refactoring of folding (#3719, #3669)

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

3 participants