mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 13:41:10 +00:00
Update inquire.rs
This commit is contained in:
parent
a71c908df5
commit
157ed4549e
2 changed files with 12 additions and 1 deletions
|
@ -19,7 +19,7 @@ use erg_parser::ast::{self, Identifier, VarName};
|
|||
use erg_parser::token::Token;
|
||||
|
||||
use crate::ty::constructors::{anon, fn_met, free_var, func, mono, poly, proc, proj, ref_, subr_t};
|
||||
use crate::ty::free::{Constraint, FreeTyParam};
|
||||
use crate::ty::free::{Constraint, FreeTyParam, FreeTyVar};
|
||||
use crate::ty::typaram::TyParam;
|
||||
use crate::ty::value::{GenTypeObj, TypeObj, ValueObj};
|
||||
use crate::ty::{
|
||||
|
@ -2317,6 +2317,10 @@ impl Context {
|
|||
if let Some(prev) = free.get_previous() {
|
||||
return prev.unbound_name().as_ref() == Some(name.inspect());
|
||||
}
|
||||
} else if let Ok(free) = <&FreeTyVar>::try_from(tp) {
|
||||
if let Some(prev) = free.get_previous() {
|
||||
return prev.unbound_name().as_ref() == Some(name.inspect());
|
||||
}
|
||||
}
|
||||
tp.qual_name().as_ref() == Some(name.inspect())
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue