Fix minimal dependency for nested entities

This commit is contained in:
Ginger Bill
2016-09-27 18:12:46 +01:00
parent 006741908b
commit f6bbd8a4c2
5 changed files with 66 additions and 93 deletions
+4 -1
View File
@@ -447,7 +447,10 @@ void add_dependency(DeclInfo *d, Entity *e) {
}
void add_declaration_dependency(Checker *c, Entity *e) {
if (c->context.decl) {
if (e == NULL) {
return;
}
if (c->context.decl != NULL) {
auto found = map_get(&c->info.entities, hash_pointer(e));
if (found) {
add_dependency(c->context.decl, e);