Fix closure property access.
This commit is contained in:
@@ -54,6 +54,17 @@ fn test_closures() -> Result<(), Box<EvalAltResult>> {
|
||||
ParseErrorType::BadInput(_)
|
||||
));
|
||||
|
||||
assert_eq!(
|
||||
engine.eval::<INT>(
|
||||
r"
|
||||
let foo = #{ x: 42 };
|
||||
let f = || { this.x };
|
||||
foo.call(f)
|
||||
",
|
||||
)?,
|
||||
42
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
engine.eval::<INT>(
|
||||
r#"
|
||||
|
Reference in New Issue
Block a user