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

export of a public variable crashes the compiler #4374

Open
cyberthirst opened this issue Nov 25, 2024 · 1 comment · May be fixed by #4375
Open

export of a public variable crashes the compiler #4374

cyberthirst opened this issue Nov 25, 2024 · 1 comment · May be fixed by #4375
Labels
bug - UX a bug related to UX

Comments

@cyberthirst
Copy link
Collaborator

Version Information

  • vyper Version (output of vyper --version): 0.4.1b2+commit.25ea3bb95
  • OS: linux
  • Python Version (output of python --version): Python 3.11.10

What's your issue about?

i: public(uint256)

exports: self.i
Error compiling: tests/custom/test.vy
AttributeError: 'NoneType' object has no attribute '_metadata'

During handling of the above exception, another exception occurred:

vyper.exceptions.CompilerPanic: unhandled exception 'NoneType' object has no attribute '_metadata'

  contract "tests/custom/test.vy:3", line 3:0 
       2
  ---> 3 exports: self.i
  -------^


This is an unhandled internal compiler error. Please create an issue on Github to notify the developers!
https://github.com/vyperlang/vyper/issues/new?template=bug.md

@cyberthirst cyberthirst added the needs triage needs triage label Nov 25, 2024
@charles-cooper charles-cooper added bug - UX a bug related to UX and removed needs triage needs triage labels Nov 25, 2024
@charles-cooper
Copy link
Member

the error message should look something like this:

Error compiling: tmp/main.vy
vyper.exceptions.StructureException: invalid export of a value

  contract "tmp/main.vy:10", line 10:9 
        9
  ---> 10 exports: self.i
  -----------------^
       11

  (hint: exports should look like <module>.<function | interface>)

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

Successfully merging a pull request may close this issue.

2 participants