Fix bug with lambda/global name collision

This commit is contained in:
Greg Shuflin 2021-10-25 14:52:19 -07:00
parent b5141e27d6
commit d6fcc65392

View File

@ -84,7 +84,9 @@ impl<'a> ScopeResolver<'a> {
},
Some(NameType::Param(n)) => {
let spec = SymbolSpec::FunctionParam(*n);
let fqsn = Fqsn { scopes: vec![Scope::Name(local_name.clone())] };
//TODO need to come up with a better solution for local variable FQSNs
let lscope = Scope::Name(Rc::new("<local-param>".to_string()));
let fqsn = Fqsn { scopes: vec![lscope, Scope::Name(local_name.clone())] };
self.symbol_table.add_symbol(id, fqsn, spec);
}
Some(NameType::LocalVariable(item_id)) => {