diff --git a/mers_lib/Cargo.toml b/mers_lib/Cargo.toml index 61fd27e..f8c3fd6 100755 --- a/mers_lib/Cargo.toml +++ b/mers_lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mers_lib" -version = "0.9.7" +version = "0.9.8" edition = "2021" license = "MIT OR Apache-2.0" description = "library to use the mers language in other projects" diff --git a/mers_lib/src/program/configs/mod.rs b/mers_lib/src/program/configs/mod.rs index 31e5dd9..b5b225c 100755 --- a/mers_lib/src/program/configs/mod.rs +++ b/mers_lib/src/program/configs/mod.rs @@ -155,10 +155,22 @@ impl Config { mut self, name: String, val: Arc>, - val_type: crate::data::Type, + mut val_type: crate::data::Type, ) -> Self { // give the correct DisplayInfo to functions' inner scopes. { + for t in val_type.types.iter_mut() { + if let Some(mut f) = t + .as_any() + .downcast_ref::() + .cloned() + { + f.1.global.object_fields = Arc::clone(&self.info_check.global.object_fields); + f.1.global.object_fields_rev = + Arc::clone(&self.info_check.global.object_fields_rev); + *t = Arc::new(f); + } + } let data = val.write().unwrap(); let mut data = data.get_mut_unchecked(); if let Some(f) = data.mut_any().downcast_mut::() {