mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 21:21:10 +00:00
Update tyvar.rs
This commit is contained in:
parent
c5e39f4a62
commit
8077e55b90
1 changed files with 2 additions and 1 deletions
|
@ -478,7 +478,8 @@ impl Context {
|
|||
Type::FreeVar(fv) if fv.constraint_is_sandwiched() => {
|
||||
let (sub_t, super_t) = fv.get_subsup().unwrap();
|
||||
if self.level <= fv.level().unwrap() {
|
||||
// REVIEW:
|
||||
// if fv == ?T(<: Int, :> Add(?T)), deref_tyvar(super_t) will cause infinite loop
|
||||
// so we need to force linking
|
||||
fv.forced_undoable_link(&sub_t);
|
||||
let res = self.validate_subsup(sub_t, super_t, variance, loc);
|
||||
fv.undo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue