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

Formatter changes brace kind in quote[...] expressions #6342

Closed
jfecher opened this issue Oct 24, 2024 · 0 comments · Fixed by #6377
Closed

Formatter changes brace kind in quote[...] expressions #6342

jfecher opened this issue Oct 24, 2024 · 0 comments · Fixed by #6377
Assignees
Labels
bug Something isn't working

Comments

@jfecher
Copy link
Contributor

jfecher commented Oct 24, 2024

Aim

Formatting:

 comptime fn check_eq_derived_for_foo(_f: FunctionDefinition) {
    let foo = quote[Foo].as_type();
    let eq = quote[Eq].as_trait_constraint();
    assert(foo.implements(eq));
 }

Expected Behavior

Formatted to the same code, plus or minus extra spacing in the quote expression

 comptime fn check_eq_derived_for_foo(_f: FunctionDefinition) {
    let foo = quote[Foo].as_type();
    let eq = quote[Eq].as_trait_constraint();
    assert(foo.implements(eq));
 }

Bug

Formats to the following:

 comptime fn check_eq_derived_for_foo(_f: FunctionDefinition) {
    let foo = quote {Foo}.as_type();
    let eq = quote {Eq}.as_trait_constraint();
    assert(foo.implements(eq));
 }

This is potentially breaking if the source quote was e.g. quote [}]

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 Oct 24, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Oct 24, 2024
@asterite asterite self-assigned this Oct 28, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Oct 29, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants