From d6fcc653928ad500b10ac3f8370060c8e8c28145 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Mon, 25 Oct 2021 14:52:19 -0700 Subject: [PATCH] Fix bug with lambda/global name collision --- schala-lang/language/src/symbol_table/resolver.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schala-lang/language/src/symbol_table/resolver.rs b/schala-lang/language/src/symbol_table/resolver.rs index 35673a5..e7cb174 100644 --- a/schala-lang/language/src/symbol_table/resolver.rs +++ b/schala-lang/language/src/symbol_table/resolver.rs @@ -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("".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)) => {