mirror of
https://github.com/Dummi26/mers.git
synced 2025-12-14 11:16:17 +01:00
fix bug where error would reference wrong file
This commit is contained in:
@@ -23,7 +23,9 @@ impl Config {
|
||||
// TODO: Type with generics
|
||||
self.add_type("List".to_string(),
|
||||
Err(Arc::new(|s, i| {
|
||||
let t = crate::parsing::types::parse_type(&mut Source::new_from_string_raw(s.to_owned()))?;
|
||||
let mut src = Source::new_from_string_raw(s.to_owned());
|
||||
let srca = Arc::new(src.clone());
|
||||
let t = crate::parsing::types::parse_type(&mut src, &srca)?;
|
||||
Ok(Arc::new(ListT(crate::parsing::types::type_from_parsed(&t, i)?)))})))
|
||||
.add_var(
|
||||
"pop".to_string(),
|
||||
|
||||
@@ -21,7 +21,9 @@ impl Config {
|
||||
self.add_type(
|
||||
"Thread".to_string(),
|
||||
Err(Arc::new(|s, i| {
|
||||
let t = crate::parsing::types::parse_type(&mut Source::new_from_string_raw(s.to_owned()))?;
|
||||
let mut src = Source::new_from_string_raw(s.to_owned());
|
||||
let srca = Arc::new(src.clone());
|
||||
let t = crate::parsing::types::parse_type(&mut src, &srca)?;
|
||||
Ok(Arc::new(ThreadT(crate::parsing::types::type_from_parsed(&t, i)?)))
|
||||
})),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user