mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 05:43:53 +01:00
fix types (see prev. commit)
This commit is contained in:
parent
08999e646a
commit
203f701758
@ -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"
|
||||
|
@ -155,10 +155,22 @@ impl Config {
|
||||
mut self,
|
||||
name: String,
|
||||
val: Arc<RwLock<Data>>,
|
||||
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::<data::function::FunctionT>()
|
||||
.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::<data::function::Function>() {
|
||||
|
Loading…
Reference in New Issue
Block a user