From 403b171c72291fd1c92167f280bb71a4482265ae Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 20 Sep 2019 01:08:00 -0700 Subject: [PATCH] remove another meta-use --- schala-lang/language/src/ast.rs | 1 - schala-lang/language/src/reduced_ast.rs | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/schala-lang/language/src/ast.rs b/schala-lang/language/src/ast.rs index 63f752a..c3ff024 100644 --- a/schala-lang/language/src/ast.rs +++ b/schala-lang/language/src/ast.rs @@ -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; diff --git a/schala-lang/language/src/reduced_ast.rs b/schala-lang/language/src/reduced_ast.rs index d1a92cf..8017612 100644 --- a/schala-lang/language/src/reduced_ast.rs +++ b/schala-lang/language/src/reduced_ast.rs @@ -358,11 +358,13 @@ fn handle_symbol(symbol: Option<&Symbol>, inner_patterns: &Vec, 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 {