Lower const params with a bad id

This commit is contained in:
hkalbasi 2023-06-05 14:57:19 +03:30
parent 68bdf609f3
commit a481e004b0
38 changed files with 475 additions and 184 deletions

View file

@ -1074,8 +1074,12 @@ impl<'db> SemanticsImpl<'db> {
fn resolve_type(&self, ty: &ast::Type) -> Option<Type> {
let analyze = self.analyze(ty.syntax())?;
let ctx = LowerCtx::with_file_id(self.db.upcast(), analyze.file_id);
let ty = hir_ty::TyLoweringContext::new(self.db, &analyze.resolver)
.lower_ty(&crate::TypeRef::from_ast(&ctx, ty.clone()));
let ty = hir_ty::TyLoweringContext::new(
self.db,
&analyze.resolver,
analyze.resolver.module().into(),
)
.lower_ty(&crate::TypeRef::from_ast(&ctx, ty.clone()));
Some(Type::new_with_resolver(self.db, &analyze.resolver, ty))
}