Skip to content

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

Merged
charles-cooper merged 1 commit intovyperlang:masterfrom
charles-cooper:fix/node_classification
Aug 28, 2024
Merged

fix[tool]: fix classification of AST nodes#4210
charles-cooper merged 1 commit intovyperlang:masterfrom
charles-cooper:fix/node_classification

Conversation

@charles-cooper
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

also, did you double check other nodes?

@charles-cooper
Copy link
Copy Markdown
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
@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