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

misleading error message for type mismatch #4311

Open
cyberthirst opened this issue Oct 17, 2024 · 0 comments
Open

misleading error message for type mismatch #4311

cyberthirst opened this issue Oct 17, 2024 · 0 comments
Labels
bug - UX a bug related to UX

Comments

@cyberthirst
Copy link
Collaborator

Version Information

  • vyper Version (output of vyper --version): b3ea663
  • OS: osx/linux/win
  • Python Version (output of python --version):

What's your issue about?

@view
def bar(s: int256) -> String[32]:
    return "reason"


@external
def foo(e: int256):
    raise self.bar(5 % e)

raises:

Error compiling: tests/custom/test4.vy
vyper.exceptions.InvalidType: revert reason must fit within String[1024]

  contract "tests/custom/test4.vy:9", function "foo", line 9:4 
       8 def foo(e: int256):
  ---> 9     raise self.bar(5 % e)
  -----------^

vyper.exceptions.InvalidType: revert reason must fit within String[1024] which isn't the true cause

How can it be fixed?

Fill this in if you know how to fix it.

@cyberthirst cyberthirst added the needs triage needs triage label Oct 17, 2024
@charles-cooper charles-cooper added bug - UX a bug related to UX and removed needs triage needs triage labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - UX a bug related to UX
Projects
None yet
Development

No branches or pull requests

3 participants
@charles-cooper @cyberthirst and others