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

assert and assert_eq aren't parsed as an expression #7308

Closed
jfecher opened this issue Feb 6, 2025 · 0 comments · Fixed by #7313
Closed

assert and assert_eq aren't parsed as an expression #7308

jfecher opened this issue Feb 6, 2025 · 0 comments · Fixed by #7313
Assignees
Labels
bug Something isn't working

Comments

@jfecher
Copy link
Contributor

jfecher commented Feb 6, 2025

Aim

Writing code using match statements, where each arm is an expression:

match _b {
    Foo::C(_) => assert(false),
    Foo::B(x) => assert_eq(x, 3),
    _ => assert(false),
}

Expected Behavior

The program to parse

Bug

Expected an expression but found 'assert' on the match branch.

This can also be seen with let _ = assert(true);

This is confusing since these look like normal function calls but are not allowed where other function calls are.

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@jfecher jfecher added the bug Something isn't working label Feb 6, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Feb 6, 2025
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants