roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
4.46k stars 313 forks source link

Optimized build error: thread 'main' panicked at crates/vendor/morphic_lib/src/analyze.rs #7047

Open JRI98 opened 2 months ago

JRI98 commented 2 months ago

The following program doesn't build when optimizations are enabled and the compiler crashes with error:

thread 'main' panicked at crates/vendor/morphic_lib/src/analyze.rs:823:73:
called `Option::unwrap()` on a `None` value
app [main] {
    pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br",
}

f = \a ->
    f (a + 1)

main =
    _ = f 0
    crash ""