Support calls to inherited methods without "this." prefix (GitHub issue #388).

(cherry picked from commit 55e06db693)
This commit is contained in:
Martin Whitaker 2020-11-23 22:03:59 +00:00
parent f0b3056bfc
commit 20c6d83ae9
1 changed files with 4 additions and 2 deletions

View File

@ -3536,8 +3536,10 @@ NetProc* PCallTask::elaborate_usr(Design*des, NetScope*scope) const
// For SystemVerilog this may be a few other things.
if (gn_system_verilog()) {
NetProc *tmp;
// This could be a method attached to a signal?
tmp = elaborate_method_(des, scope);
// This could be a method attached to a signal
// or defined in this object?
bool try_implicit_this = scope->get_class_scope() && path_.size() == 1;
tmp = elaborate_method_(des, scope, try_implicit_this);
if (tmp) return tmp;
// Or it could be a function call ignoring the return?
tmp = elaborate_function_(des, scope);