You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 26, 2020. It is now read-only.
Evaluation order seems to be wrong when the dot operator is used.
#[test]fntest_operator_precedence(){// Show that operator precedence is working as expected.assert_eq!(eval(r#""a" == "a" && "b" == "b""#),Ok(to_value(true)));letmut v = HashMap::new();
v.insert("a","1");
v.insert("b","2");// This is returning the expected result if we put the comparisons between parentheses.assert_eq!(Expr::new("(v.a == v.a) && (v.b == v.b)").value("v", v.clone()).exec(),Ok(to_value(true)));// This should return the same result as the previous Expr, but it is instead // returning Err(UnsupportedTypes("String(\"1\")", "Bool(true)")).assert_eq!(Expr::new("v.a == v.a && v.b == v.b").value("v", v).exec(),Ok(to_value(true)));}
Evaluation order seems to be wrong when the dot operator is used.