fix: failure of the type inference of another module

This commit is contained in:
Shunsuke Shibayama 2023-02-22 11:55:02 +09:00
parent aa2cea60dd
commit 5c4c43ab2f
8 changed files with 119 additions and 59 deletions

View file

@ -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)