Update inquire.rs

This commit is contained in:
Shunsuke Shibayama 2023-03-12 12:31:01 +09:00
parent fb26d6d80e
commit 359a030347

View file

@ -2268,6 +2268,8 @@ impl Context {
// rec_get_const_localとは違い、位置情報を持たないしエラーとならない
pub(crate) fn rec_get_const_obj(&self, name: &str) -> Option<&ValueObj> {
#[cfg(feature = "py_compatible")]
let name = self.erg_to_py_names.get(name).map_or(name, |s| &s[..]);
if let Some(val) = self.consts.get(name) {
return Some(val);
}