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

Nargo fmt crashes on functions without args without parens #6960

Closed
spalladino opened this issue Jan 6, 2025 · 1 comment · Fixed by #6967
Closed

Nargo fmt crashes on functions without args without parens #6960

spalladino opened this issue Jan 6, 2025 · 1 comment · Fixed by #6967
Assignees
Labels
bug Something isn't working

Comments

@spalladino
Copy link
Contributor

Aim

Format:

fn foo {
    assert(1==2);
}

Expected Behavior

Running nargo fmt works. Note that nargo build works.

Bug

warning: unused function foo
  ┌─ src/main.nr:1:4
  │
1 │ fn foo {
  │    --- unused function
  │

$ nargo fmt
The application panicked (crashed).
Message:  Expected token LeftParen, got: LeftBrace
Location: tooling/nargo_fmt/src/formatter.rs:193

This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/.
If there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml

To Reproduce

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

7311d8c

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

@spalladino spalladino added the bug Something isn't working label Jan 6, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 6, 2025
@asterite asterite self-assigned this Jan 7, 2025
@asterite
Copy link
Collaborator

asterite commented Jan 7, 2025

Thank you for reporting this!

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: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

2 participants