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

Expr::TrySuffix expression was not completely removed in desugar_value_def_suffixed #7292

Open
tonyfinn opened this issue Dec 1, 2024 · 1 comment
Labels
bug Something isn't working P-high High priority/frequency

Comments

@tonyfinn
Copy link

tonyfinn commented Dec 1, 2024

Error:

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>
a Expr::TrySuffix expression was not completely removed in desugar_value_def_suffixed
Location: crates/compiler/can/src/expr.rs:1174:40

Code:

app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" }

import pf.Arg
import pf.File
import pf.Stdout

main =
    Arg.list! {}
        |> List.get 0
        |> Result.withDefault "input.txt"
        |> File.readUtf8!
        |> Stdout.line!

(This is literally my first Roc program, so not sure what else would be helpful)

@Anton-4 Anton-4 added P-high High priority/frequency bug Something isn't working labels Dec 2, 2024
@Anton-4
Copy link
Collaborator

Anton-4 commented Dec 2, 2024

Sorry for the bad first experience @tonyfinn!

I've made this a high priority issue.

As a workaround; you can leave out the final !, so |> Stdout.line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-high High priority/frequency
Projects
None yet
Development

No branches or pull requests

2 participants