Add Dynamic::clone_cast.

This commit is contained in:
Stephen Chung
2021-03-30 18:57:16 +08:00
parent ec7b906f71
commit b14d18934a
7 changed files with 70 additions and 33 deletions

View File

@@ -59,6 +59,11 @@ fn test_arrays() -> Result<(), Box<EvalAltResult>> {
5
);
let mut a = Array::new();
a.push((42 as INT).into());
assert_eq!(a[0].clone_cast::<INT>(), 42);
Ok(())
}