Fix broken search where member names accidentally match variables.

This commit is contained in:
Stephen Williams 2014-02-03 20:04:24 -08:00
parent 52a9fdde8a
commit a012406ca4
1 changed files with 6 additions and 3 deletions

View File

@ -58,9 +58,9 @@ struct symbol_search_results {
NetEvent*eve;
};
bool symbol_search(const LineInfo*li, Design*des, NetScope*scope,
pform_name_t path, struct symbol_search_results*res,
NetScope*start_scope = 0)
static bool symbol_search(const LineInfo*li, Design*des, NetScope*scope,
pform_name_t path, struct symbol_search_results*res,
NetScope*start_scope = 0)
{
assert(scope);
bool prefix_scope = false;
@ -100,6 +100,9 @@ bool symbol_search(const LineInfo*li, Design*des, NetScope*scope,
"`" << path_tail.name << "' in path `" << path << "'" << endl;
des->errors += 1;
}
} else {
// Prefix is present, but is NOT a scope. Fail!
return false;
}
}