Shared Dynamic tests and fixes in Engine; Also fixed a bug in Parser variable capturing

This commit is contained in:
Ilya Lakhin
2020-07-31 10:44:57 +07:00
parent aa87a7f5ef
commit 060dd33046
3 changed files with 231 additions and 137 deletions

View File

@@ -1031,7 +1031,7 @@ impl Dynamic {
_ => Err(cell.value_type_name),
}
#[cfg(feature = "sync")]
match &cell.container.read().deref().0 {
match &cell.container.read().unwrap().deref().0 {
Union::Str(s) => Ok(s.clone()),
Union::FnPtr(f) => Ok(f.clone().take_data().0),
_ => Err(cell.value_type_name),