Open Anton-4 opened 1 year ago
I'm guessing this is probably the same issue? Tested on commit 5d09479fd365d8fbaefa640830725eb91955f1a7
# Thing.roc
module [InputType]
InputType t1 t2 : [
A t2 (InputType t1 t2),
B t1,
C,
D,
E,
F,
G,
H,
I,
] where t1 implements Eq
OutputType t1 t2 : List [Out t2] where t1 implements Eq
f : OutputType t1 t2, InputType t1 t2 -> OutputType t1 t2
f = \out, inp ->
when inp is
A someT2 _ ->
out |> List.append (Out someT2)
B _ | C | D | E | F | G | H | I ->
out
expect
left = A Y (B Z)
f [] left == []
❯ cargo run -- test Thing.roc
Finished dev [unoptimized + debuginfo] target(s) in 0.59s
Running `/Users/ajainelson/prog/roc/roc/target/debug/roc test Thing.roc`
thread 'main' panicked at /Users/ajainelson/prog/roc/roc/crates/repl_eval/src/eval.rs:918:64:
index out of bounds: the len is 8 but the index is 169
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I did not minimize the code completely because these types of issues should be fixed once we use inspect for dbg. Similar issue with minimized example here.