From d97d940d239197091f4472e79d86bce61761640c 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 0906698f..ddf29864 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), } }