Merge branch 'main' of github.com:Mathieu-Lala/rhai into fix/lint

This commit is contained in:
Mathieu Lala
2023-02-05 17:18:45 +01:00
23 changed files with 281 additions and 118 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>(