roc
roc copied to clipboard
`mono` panic for inline expect in platform `interface` module
This can be reproduced on ec93e024175167fe6906f979f09c5901262dc595 with roc build examples/platform-switching/rocLovesC.roc (roc check passes) - that file has been modified to call a new function from pf.Dep, namely:
interface Dep
exposes [strIdentity]
imports []
strIdentity : Str -> Str
strIdentity = \input ->
expect Bool.true
input
This panics with:
'if expects are compiled, their subs should be available', crates/compiler/mono/src/ir.rs:6797:40
Everything works if you either:
- remove the inline
expect, or: - move
Dep.rocout of the platform and into the application
So it seems to be a bug specifically with inline expects in other packages.
Just ran into this bug while writing my roc-book chapter code.
I commented out the inline expects in roc-lang/unicode as a workaround for this issue.