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

Require type decl in for..in loops #4808

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

ChrisDodd
Copy link
Contributor

No description provided.

Copy link
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As usual, I am reviewing the changes to the test programs and their expected output files, but not the C++ changes.

builder.supressStatementSemi();
visit(di, "decl");
} else {
visit(s->ref, "ref");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this branch be used for a code that is accepted by the parser?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No -- any code that hits this branch will dump in a form that can't be parsed. Perhaps this should be a BUG instead, as this should not happen -- there should always be a declaration of the symbol in scope.

Signed-off-by: Chris Dodd <cdodd@nvidia.com>
@ChrisDodd ChrisDodd added this pull request to the merge queue Jul 16, 2024
Merged via the queue into p4lang:main with commit 578e2df Jul 16, 2024
17 checks passed
@ChrisDodd ChrisDodd deleted the cdodd-forinfix branch July 16, 2024 11:44
@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants