Arithmetic underflow crashes clarity-repl instead of displaying error
If you try to subtract two unsigned values clarity-repl panics and crashes. Example of (- u5 u7) below. Shouldn't a more correct behavior be to report the "Arithmetic Underflow" like it reports other errors, but without crashing the application?
` clarity-repl v0.16.0 Enter "::help" for usage hints. Connected to a transient in-memory database.
(- 5 u7) Analysis error: expecting expression of type 'int', found 'uint' (- 5 u7) (- u5 7) Analysis error: expecting expression of type 'uint', found 'int' (- u5 7) (- u5 u7) thread 'main' panicked at 'called
Result::unwrap()on anErrvalue: Runtime(ArithmeticUnderflow, Some([]))', src/repl/interpreter.rs:215:89 note: run withRUST_BACKTRACE=1environment variable to display a backtrace `
Thanks for raising this issue. These are exactly the kind of rough edges that we would like to be addressed before considering this lib as a 1.0.0.
Addressed with https://github.com/hirosystems/clarinet/pull/535