mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
chore: improve refinement types display
This commit is contained in:
parent
4393649ffc
commit
8350ad0581
4 changed files with 30 additions and 16 deletions
|
@ -257,6 +257,17 @@ impl TyVarCache {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn push_refine_var(&mut self, name: &VarName, t: Type, ctx: &Context) {
|
||||
if name.inspect() == "_" {
|
||||
return;
|
||||
}
|
||||
let vi = VarInfo::type_var(t, ctx.absolutize(name.loc()), ctx.name.clone());
|
||||
ctx.index().register(name.inspect().clone(), &vi);
|
||||
self.var_infos.insert(name.clone(), vi);
|
||||
let tp = TyParam::mono(name.inspect());
|
||||
self.typaram_instances.insert(name.clone(), tp);
|
||||
}
|
||||
|
||||
pub(crate) fn dummy_push_or_init_typaram(
|
||||
&mut self,
|
||||
name: &VarName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue