Incorrect results with unary minus signs
Created by: xTibor
Reproduction:
use calc::eval;
// ...
println!("{:?}", eval("-1 + 1"));
Expected behavior:
0
Actual behavior:
-2
Calc interprets that expression as -(1 + 1)
Build information:
-
calc
: 233711fd -
rustc -V
:rustc 1.23.0-nightly (d6b06c63a 2017-11-09)
- System: KDE neon 5.11 (Ubuntu 16.04 LTS)