remove another meta-use

This commit is contained in:
greg 2019-09-20 01:08:00 -07:00
parent e5a09a6ee8
commit 403b171c72
2 changed files with 4 additions and 3 deletions

View File

@ -2,7 +2,6 @@ use std::rc::Rc;
use std::convert::From;
use crate::derivative::Derivative;
use crate::typechecking::TypeData;
use crate::symbol_table::FullyQualifiedSymbolName;
mod operators;

View File

@ -358,11 +358,13 @@ fn handle_symbol(symbol: Option<&Symbol>, inner_patterns: &Vec<Pattern>, symbol_
});
let bound_vars = inner_patterns.iter().map(|p| match p {
VarOrName(meta_name) => {
let symbol_exists = meta_name.fqsn.as_ref().and_then(|fqsn| symbol_table.lookup_by_fqsn(&fqsn)).is_some();
let qualified_name = meta_name.node();
let fqsn = symbol_table.get_fqsn_from_id(&qualified_name.id);
let symbol_exists = fqsn.and_then(|fqsn| symbol_table.lookup_by_fqsn(&fqsn)).is_some();
if symbol_exists {
None
} else {
let QualifiedName { components, .. } = meta_name.node();
let QualifiedName { components, .. } = qualified_name;
if components.len() == 1 {
Some(components[0].clone())
} else {