mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
fix: nested module resolution bug
This commit is contained in:
parent
83aae24317
commit
ded10fc3d9
7 changed files with 51 additions and 24 deletions
|
@ -51,10 +51,12 @@ pub enum SubstituteResult {
|
|||
}
|
||||
|
||||
impl Context {
|
||||
/// Returns `true` if the module is being inspected, or has been inspected
|
||||
pub(crate) fn mod_registered(&self, path: &NormalizedPathBuf) -> bool {
|
||||
(self.shared.is_some() && self.promises().is_registered(path)) || self.mod_cached(path)
|
||||
}
|
||||
|
||||
/// Returns `true` if the module has been inspected
|
||||
pub(crate) fn mod_cached(&self, path: &Path) -> bool {
|
||||
self.mod_cache().get(path).is_some() || self.py_mod_cache().get(path).is_some()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue