Evaluating nonextant variable results into Undefined

This commit is contained in:
Erin 2022-05-06 20:20:52 +02:00 committed by ondra05
parent e85f766a1d
commit 9f91a72b01

View file

@ -539,10 +539,7 @@ impl ExecEnv {
kind: ErrorKind::MeloVariable(name.item.to_owned()), kind: ErrorKind::MeloVariable(name.item.to_owned()),
span: name.span.clone(), span: name.span.clone(),
}), }),
None => Err(Error { None => Ok(Value::Undefined),
kind: ErrorKind::UnknownVariable(name.item.to_owned()),
span: name.span.clone(),
}),
} }
} }