Extract copy/restore of first argument in method call.

This commit is contained in:
Stephen Chung
2020-05-29 18:15:58 +08:00
parent 9616452c00
commit e1242df5c8
5 changed files with 74 additions and 46 deletions

View File

@@ -33,7 +33,7 @@ fn test_method_call() -> Result<(), Box<EvalAltResult>> {
assert_eq!(
engine.eval::<TestStruct>("let x = new_ts(); update(x, 1000); x")?,
TestStruct { x: 1 }
TestStruct { x: 1001 }
);
Ok(())