Changing the signature to |3.2 solved it, but the above code on branch main commit e3ccd04b yields:
The application panicked (crashed).
Message: slice index starts at 2 but ends at 1
Location: /private/tmp/rust-20240215-5649-scngkd/rustc-1.76.0-src/library/alloc/src/vec/mod.rs:2084
Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Error: Switch branch's signature |3 is incompatible with previous branches |1.0
at file.ua:1:12
1 | Foo ← |3 ⟨◌|Foo -1⟩±.⊙⊙∘
────────
Error: Function signature mismatch: declared |3 but inferred |3.2
at file.ua:1:7
1 | Foo ← |3 ⟨◌|Foo -1⟩±.⊙⊙∘
───
Error:
The interpreter has crashed!
Hooray! You found a bug!
Please report this at http://github.com/uiua-lang/uiua/issues/new or on Discord at https://discord.gg/9CU2ME4kmn.
code:
file.ua:1:10
at file.ua:1:10
1 | Foo ← |3 ⟨◌|Foo -1⟩±.⊙⊙∘
──────────
Minimum repro:
Changing the signature to
|3.2
solved it, but the above code on branchmain
commite3ccd04b
yields: