Fix crash when a reference to an unbound var is checked
This commit is contained in:
parent
c98f47b564
commit
9af655c072
1 changed files with 3 additions and 3 deletions
|
@ -340,10 +340,10 @@ ConstraintSet Checker::inferMany(TypeEnv& Env, std::vector<Node*>& Elements, Typ
|
|||
Node* From;
|
||||
void visitReferenceExpression(ReferenceExpression* E) {
|
||||
auto To = E->getScope()->lookup(E->getSymbolPath());
|
||||
if (isa<Parameter>(To)) {
|
||||
To = To->Parent;
|
||||
}
|
||||
if (To != nullptr) {
|
||||
if (isa<Parameter>(To)) {
|
||||
To = To->Parent;
|
||||
}
|
||||
G.add_edge(From, To);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue