Fix bug in dotting-indexing.

This commit is contained in:
Stephen Chung
2021-08-17 15:32:48 +08:00
parent 8a8bc2adfb
commit 224a2dfb60
2 changed files with 40 additions and 38 deletions

View File

@@ -168,6 +168,9 @@ fn test_array_with_structs() -> Result<(), Box<EvalAltResult>> {
fn test_arrays_map_reduce() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(engine.eval::<INT>("[1].map(|x| x + 41)[0]")?, 42);
assert_eq!(engine.eval::<INT>("([1].map(|x| x + 41))[0]")?, 42);
assert_eq!(
convert_to_vec::<INT>(engine.eval(
"