Fix unbound variables not being searched for in the solved type
This commit is contained in:
parent
71912f8c65
commit
c1e1962cfd
1 changed files with 8 additions and 2 deletions
|
@ -475,8 +475,14 @@ auto getUnbound(const TypeEnv& Env, Type* Ty) {
|
|||
Env(Env) {}
|
||||
std::vector<TVar*> Out;
|
||||
void visitVar(TVar* TV) {
|
||||
if (!Env.hasVar(TV)) {
|
||||
Out.push_back(TV);
|
||||
auto Solved = TV->find();
|
||||
if (isa<TVar>(Solved)) {
|
||||
auto Var = static_cast<TVar*>(Solved);
|
||||
if (!Env.hasVar(Var)) {
|
||||
Out.push_back(Var);
|
||||
}
|
||||
} else {
|
||||
visit(Solved);
|
||||
}
|
||||
}
|
||||
} V { Env };
|
||||
|
|
Loading…
Reference in a new issue