From 5551a8f8a86797b17afee516cb7400d970588ff8 Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Wed, 8 Jul 2020 21:01:05 -0400 Subject: [PATCH] avoid hashing identifier for function when empty --- src/scope.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scope.rs b/src/scope.rs index 733b9cd..b6b82cd 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -66,6 +66,9 @@ impl Scope { } fn fn_exists(&self, name: &Identifier) -> bool { + if self.functions.is_empty() { + return false; + } self.functions.contains_key(name) }