Fix bug with calling a pure function method-call style.

This commit is contained in:
Stephen Chung
2020-05-11 18:55:58 +08:00
parent 4a8710a4a9
commit 414f3d3c23
8 changed files with 221 additions and 115 deletions

View File

@@ -38,3 +38,12 @@ fn test_method_call() -> Result<(), Box<EvalAltResult>> {
Ok(())
}
#[test]
fn test_method_call_style() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new();
assert_eq!(engine.eval::<INT>("let x = -123; x.abs(); x")?, -123);
Ok(())
}