This commit is contained in:
Tiffany Bennett 2023-11-22 20:58:08 -08:00
parent f64cb2cb73
commit 2c49c5f1aa
2 changed files with 8 additions and 2 deletions

View file

@ -234,11 +234,11 @@ impl ExprReply {
Expr::UnaryOp(ref unaryop) => match unaryop.op {
UnaryOpType::Positive => {
literal!("+");
recurse(expr, parts, Precedence::Plus)
recurse(&unaryop.expr, parts, Precedence::Plus)
}
UnaryOpType::Negative => {
literal!("-");
recurse(expr, parts, Precedence::Plus)
recurse(&unaryop.expr, parts, Precedence::Plus)
}
UnaryOpType::Degree(ref suffix) => {
if prec < Precedence::Mul {

View file

@ -697,3 +697,9 @@ fn quantity_defs() {
"Definition: energy = physical quantity for force length (kg m^2 / s^2)",
);
}
#[test]
fn test_tim() {
// Issue #151, rink crashing due to stack overflow
test("Tim", "Definition: Tim = 12^-4 hour = 3125/18, approx. 173.6111 millisecond (time; s)");
}