Fix bug with calling a pure function method-call style.
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user