Fix bug in chain parsing.

This commit is contained in:
Stephen Chung
2023-01-25 07:37:44 +08:00
parent ea3efe654c
commit 733bb07d2d
3 changed files with 19 additions and 2 deletions

View File

@@ -133,6 +133,20 @@ fn test_arrays() -> Result<(), Box<EvalAltResult>> {
);
}
#[cfg(not(feature = "no_object"))]
assert_eq!(
engine.eval::<INT>(
"
let x = #{ foo: 42 };
let n = 0;
let a = [[x]];
let i = [n];
a[n][i[n]].foo
"
)?,
42
);
assert_eq!(
engine
.eval::<Dynamic>(