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

Parse error was: "Expr(Closure(Body(If(Else(@51), @27), @27), @20), @12)" #7492

Open
lukewilliamboswell opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working formatting Relates to the roc formatter parsing Relates to the Parsing compiler stage

Comments

@lukewilliamboswell
Copy link
Collaborator

$ roc format format-bug.roc
An internal compiler expectation was broken.
This is definitely a compiler bug.
Please file an issue here: <https://github.com/roc-lang/roc/issues/new/choose>
Formatting bug; formatted code isn't valid

I wrote the incorrect result to this file for debugging purposes:
format-bug.roc-format-failed

Parse error was: "Expr(Closure(Body(If(Else(@51), @27), @27), @20), @12)"


Location: crates/cli/src/format.rs:106:21
module [foo]

# Parse error was: "Expr(Closure(Body(If(Else(@51), @27), @27), @20), @12)"
foo = \cp -> if Bool.true then A else if Bool.false then B else C

# Is OK
# foo = \cp -> if Bool.true then A else B
@lukewilliamboswell lukewilliamboswell added bug Something isn't working formatting Relates to the roc formatter parsing Relates to the Parsing compiler stage labels Jan 10, 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 formatting Relates to the roc formatter parsing Relates to the Parsing compiler stage
Projects
None yet
Development

No branches or pull requests

1 participant