You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code fails with roc nightly pre-release, built from commit 9a4d556 on Mon Sep 9 09:02:33 UTC 2024:
app [main] {
pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.15.0/SlwdbJ-3GR7uBWQo6zlmYWNYOxnvo8r6YABXD-45UOw.tar.br",
}
import pf.Stdoutinc = \i ->
if i >2thenErrMaxReachedelseOk (i +1)
expect
run = \i ->
newi =
i
|> inc?
|> inc?
Ok newi
result = run 0
result ==Ok2main =
Stdout.line! "Hello world"
The error is:
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:1125:40
The problem disappears if I define the run function outside the expect statement. However, I'd like to avoid polluting the global scope, and I'd like to keep the function tied to the expect statement.
The text was updated successfully, but these errors were encountered:
The following code fails with
roc nightly pre-release, built from commit 9a4d556 on Mon Sep 9 09:02:33 UTC 2024
:The error is:
The problem disappears if I define the
run
function outside theexpect
statement. However, I'd like to avoid polluting the global scope, and I'd like to keep the function tied to theexpect
statement.The text was updated successfully, but these errors were encountered: