Open lukewilliamboswell opened 1 year ago
This might be related. I ran into something similar when trying to unpack an opaque type containing a lambda:
module [Foo]
Foo := { fn : {} -> Str }
expect
x = @Foo { fn: \_ -> "Hi" }
(@Foo res) = x
res.fn {} == "Hi"
roc test
will fail with:
thread 'main' panicked at crates/compiler/mono/src/inc_dec.rs:400:26:
Expected symbol to be in the map
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
roc check
is fine.
Roc commit 70fa3ecdc2c76a8bde74bed2048beb8d02bdbd92
Probably the same as https://github.com/roc-lang/roc/issues/5513 , in which case it was fixed by https://github.com/roc-lang/roc/pull/6493
Still reproduces on Apple silicon:
module [Foo]
Foo := { fn : {} -> Str }
expect
x = @Foo { fn: \_ -> "Hi" }
(@Foo res) = x
res.fn {} == "Hi"
Thanks for cleaning up issues!
I can unfortunately still reproduce the error too on x86_64 linux.
This happens when unwrapping the NeedsColors opaque type.
(@NeedsColors {colors}, { foo, bar, baz }) = ...
looks to be the cause, as(_, { foo, bar, baz }) = ...
or(state, { foo, bar, baz }) = ...
are ok.Crashes
Works