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

fix[tool]: fix classification of AST nodes #4210

Merged

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Aug 15, 2024

What I did

How I did it

How to verify it

Commit message

fix classification of some AST nodes for proper type checking.

this is a hygienic fix, it should have no observable semantic changes.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

fix classification of AnnAssign nodes
@charles-cooper charles-cooper added this to the v0.4.1 milestone Aug 15, 2024
@charles-cooper charles-cooper changed the title fix: AST node classification fix[tool]: AST node classification Aug 15, 2024
@charles-cooper charles-cooper marked this pull request as ready for review August 27, 2024 11:17
@cyberthirst
Copy link
Collaborator

how was this discovered - was it motivated by some issue?

also, did you double check other nodes?

@charles-cooper
Copy link
Member Author

how was this discovered - was it motivated by some issue?

also, did you double check other nodes?

I was preparing a fix for vyperlang/titanoboa#284 and wanted to use the technique of using node.get_ancestor(vy_ast.Stmt). So I manually double checked if all the nodes that should be stmt nodes were classified as such, and found these nodes.

@charles-cooper charles-cooper changed the title fix[tool]: AST node classification fix[tool]: fix classification of Stmt AST nodes Aug 28, 2024
@charles-cooper charles-cooper changed the title fix[tool]: fix classification of Stmt AST nodes fix[tool]: fix classification of AST nodes Aug 28, 2024
@charles-cooper charles-cooper merged commit f2975d7 into vyperlang:master Aug 28, 2024
157 of 159 checks passed
@charles-cooper charles-cooper deleted the fix/node_classification branch August 28, 2024 04:38
xrchz pushed a commit to xrchz/vyper that referenced this pull request Sep 1, 2024
fix classification of some AST nodes for proper type checking.

this is a hygienic fix, it should have no observable semantic changes.
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 this pull request may close these issues.

2 participants