Evaluating nonextant variable results into Undefined

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

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(),
}),
} }
} }