[red-knot] Add type inference for basic for loops (#13195)

This commit is contained in:
Alex Waygood 2024-09-04 11:19:50 +01:00 committed by GitHub
parent 57289099bb
commit 46a457318d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 331 additions and 131 deletions

View file

@ -8,7 +8,7 @@ use crate::module_name::ModuleName;
use crate::module_resolver::{resolve_module, Module};
use crate::semantic_index::ast_ids::HasScopedAstId;
use crate::semantic_index::semantic_index;
use crate::types::{definition_ty, global_symbol_ty_by_name, infer_scope_types, Type};
use crate::types::{definition_ty, global_symbol_ty, infer_scope_types, Type};
use crate::Db;
pub struct SemanticModel<'db> {
@ -40,7 +40,7 @@ impl<'db> SemanticModel<'db> {
}
pub fn global_symbol_ty(&self, module: &Module, symbol_name: &str) -> Type<'db> {
global_symbol_ty_by_name(self.db, module.file(), symbol_name)
global_symbol_ty(self.db, module.file(), symbol_name)
}
}