mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: failure of the type inference of another module
This commit is contained in:
parent
aa2cea60dd
commit
5c4c43ab2f
8 changed files with 119 additions and 59 deletions
|
@ -416,7 +416,7 @@ impl ContextProvider for Context {
|
|||
|
||||
fn get_receiver_ctx(&self, receiver_name: &str) -> Option<&Context> {
|
||||
self.get_mod(receiver_name)
|
||||
.or_else(|| self.rec_get_type(receiver_name).map(|(_, ctx)| ctx))
|
||||
.or_else(|| self.rec_local_get_type(receiver_name).map(|(_, ctx)| ctx))
|
||||
.or_else(|| {
|
||||
let (_, vi) = self.get_var_info(receiver_name)?;
|
||||
self.get_nominal_type_ctx(&vi.t).map(|(_, ctx)| ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue