From 9f91a72b011ce3604b873d57a6a9144cf919993b Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 6 May 2022 20:20:52 +0200 Subject: [PATCH] Evaluating nonextant variable results into Undefined --- ablescript/src/interpret.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ablescript/src/interpret.rs b/ablescript/src/interpret.rs index 0906698..ddf2986 100644 --- a/ablescript/src/interpret.rs +++ b/ablescript/src/interpret.rs @@ -539,10 +539,7 @@ impl ExecEnv { kind: ErrorKind::MeloVariable(name.item.to_owned()), span: name.span.clone(), }), - None => Err(Error { - kind: ErrorKind::UnknownVariable(name.item.to_owned()), - span: name.span.clone(), - }), + None => Ok(Value::Undefined), } }