mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-24 21:23:45 +00:00
fix: check signature of partially specialized functions (#840)
This commit is contained in:
parent
78a4117ec6
commit
378d412cf7
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::ops::Deref;
|
||||
|
||||
use typst::foundations::{self, Func};
|
||||
|
||||
use crate::ty::prelude::*;
|
||||
|
@ -99,7 +101,12 @@ impl Ty {
|
|||
results.push(DocSource::Var(ty.clone()));
|
||||
}
|
||||
With(ty) => collect(&ty.sig, results),
|
||||
Select(_ty) => {
|
||||
Select(ty) => {
|
||||
// todo: do this correctly
|
||||
if matches!(ty.select.deref(), "with" | "where") {
|
||||
collect(&ty.ty, results);
|
||||
}
|
||||
|
||||
// collect(&ty.ty, results)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,9 +47,14 @@ impl<'a> Sig<'a> {
|
|||
}
|
||||
|
||||
pub fn shape(self, ctx: &mut impl TyCtxMut) -> Option<SigShape<'a>> {
|
||||
let (cano_sig, withs) = match self {
|
||||
let (sig, _is_partialize) = match self {
|
||||
Sig::Partialize(sig) => (*sig, true),
|
||||
sig => (sig, false),
|
||||
};
|
||||
|
||||
let (cano_sig, withs) = match sig {
|
||||
Sig::With { sig, withs, .. } => (*sig, Some(withs)),
|
||||
_ => (self, None),
|
||||
sig => (sig, None),
|
||||
};
|
||||
|
||||
let sig_ins = match cano_sig {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue