Fixed infinite loop

This commit is contained in:
Alexandros Naskos
2020-06-18 03:23:56 +03:00
parent 5e7fc18404
commit 6c718a59c4
2 changed files with 22 additions and 15 deletions

View File

@@ -580,6 +580,10 @@ fn resolveTypeOfNodeInternal(
}
if (try lookupSymbolGlobal(store, arena, handle, handle.tree.getNodeSource(node), handle.tree.token_locs[node.firstToken()].start)) |child| {
switch(child.decl.*) {
.ast_node => |n| if (n == node) return null,
else => {},
}
return try child.resolveType(store, arena, bound_type_params);
}
return null;