REPL loses function definition
samueltardieu opened this issue · 2 comments
samueltardieu commented
The REPL is unable to use a function interactively as it cannot get its content:
$ uiua repl
Uiua 0.7.1 (end with ctrl+C)
» Foo=0
↪ Foo ← 0
» Foo
↪ Foo
The application panicked (crashed).
Message: index out of bounds: the len is 0 but the index is 0
Location: src/compile.rs:1007
Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Error: The compiler has crashed!
Hooray! You found a bug!
Please report this at http://github.com/uiua-lang/uiua/issues/new
code:
Foo
samueltardieu commented
Note that sometimes this seems to work when assigning a constant. However, assigning a function seems to reliably trigger the crash:
Foo = id
↪ Foo ← ∘
» Foo
↪ Foo
The application panicked (crashed).
Message: range end index 1 out of range for slice of length 0
Location: src/assembly.rs:56
Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Error: The compiler has crashed!
Hooray! You found a bug!
Please report this at http://github.com/uiua-lang/uiua/issues/new
code:
Foo
samueltardieu commented
Confirmed fixed, thanks.