mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +00:00
fix: import type inference result from other modules (#2168)
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
fix #2131
This commit is contained in:
parent
d80199d744
commit
29a10c144e
15 changed files with 215 additions and 39 deletions
|
|
@ -119,15 +119,11 @@ struct ScanDefCtx<'a> {
|
|||
|
||||
impl ScanDefCtx<'_> {
|
||||
fn defs(&mut self, paths: EcoVec<&str>, ei: ExprInfo) -> DefInfo {
|
||||
let name = {
|
||||
let stem = ei.fid.vpath().as_rooted_path().file_stem();
|
||||
stem.and_then(|s| Some(Interned::new_str(s.to_str()?)))
|
||||
.unwrap_or_default()
|
||||
};
|
||||
let module_decl = Decl::module(name.clone(), ei.fid).into();
|
||||
let module_decl = Decl::module(ei.fid);
|
||||
let key = module_decl.name().clone();
|
||||
let site = Some(self.root);
|
||||
let paths = paths.clone();
|
||||
self.def(&name, paths, site.as_ref(), &module_decl, None)
|
||||
self.def(&key, paths, site.as_ref(), &module_decl.into(), None)
|
||||
}
|
||||
|
||||
fn expr(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue