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

Encoding of fractions fails with compiler panic #6669

Open
FabHof opened this issue Apr 23, 2024 · 0 comments
Open

Encoding of fractions fails with compiler panic #6669

FabHof opened this issue Apr 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FabHof
Copy link
Contributor

FabHof commented Apr 23, 2024

Code:

...

main =
    enc = 1.2 |> Encode.toBytes json
    ...

error:

thread '<unnamed>' panicked at crates/compiler/mono/src/ir.rs:6143:56:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


There was an unrecoverable error in the Roc compiler. The `roc check` command can sometimes give a more helpful error report than other commands.

Interestingly this works without a problem:

...

main =
    enc = 1.2dec |> Encode.toBytes json
    ...
@lukewilliamboswell lukewilliamboswell added the bug Something isn't working label Apr 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
None yet
Development

No branches or pull requests

2 participants