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

Add missing type annotation to loop variable in for loop examples #521

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

jlapeyre
Copy link
Contributor

@jlapeyre jlapeyre commented Mar 20, 2024

In several examples of for loops in the language specification there is no annotation, or type specification, on the loop variable. According to the spec omitting the annotation is not allowed.

This commit corrects each such instance by adding an annotation.

TODO

Done This will need a release note. I'll add one if and when it looks like this will be merged.

In several examples of `for` loops in the language specification there
is no annotation, or type specification on the loop variable. According
to the spec omitting the annotation is not allowed.

This commit corrects each such instance by adding an annotation.
@jlapeyre jlapeyre added the error in spec Unambiguous error in text/examples label Mar 22, 2024
Copy link
Contributor

@hodgestar hodgestar left a comment

Choose a reason for hiding this comment

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

The change looks good.

I wonder if there is a way to check that the examples in the specification can be parsed.

Copy link
Contributor

@braised-babbage braised-babbage left a comment

Choose a reason for hiding this comment

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

👍

@jlapeyre jlapeyre merged commit ea01c71 into openqasm:main Apr 3, 2024
11 checks passed
@jlapeyre jlapeyre deleted the loop-var-type branch April 3, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error in spec Unambiguous error in text/examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants