diff --git a/elab_expr.cc b/elab_expr.cc index d14602f09..673afb19b 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -2054,6 +2054,12 @@ NetExpr* PECallFunction::elaborate_expr_method_(Design*des, NetScope*scope, perm_string method_name = peek_tail_name(use_path); use_path.pop_back(); + // If there is no object to the left of the method name, then + // give up on the idea of looking for an object method. + if (use_path.empty()) { + return 0; + } + NetNet *net = 0; const NetExpr *par; NetEvent *eve; diff --git a/symbol_search.cc b/symbol_search.cc index 3302bff5a..1b26bb22a 100644 --- a/symbol_search.cc +++ b/symbol_search.cc @@ -65,6 +65,8 @@ bool symbol_search(const LineInfo*li, Design*des, NetScope*scope, assert(scope); bool prefix_scope = false; bool recurse_flag = false; + + ivl_assert(*li, ! path.empty()); name_component_t path_tail = path.back(); path.pop_back();