Update eval.rs

This commit is contained in:
Shunsuke Shibayama 2023-03-15 16:57:31 +09:00
parent d72f56462e
commit 6a8837aa8e

View file

@ -149,7 +149,9 @@ impl Context {
Err(err) => {
if let Expr::Accessor(acc) = attr.obj.as_ref() {
if let Some(mod_ctx) = self.get_mod_ctx_from_acc(acc) {
return mod_ctx.eval_const_ident(&attr.ident);
if let Ok(obj) = mod_ctx.eval_const_ident(&attr.ident) {
return Ok(obj);
}
}
}
Err(err)