It may not be stated explicitly in the LRM if we searched first in the current scope of if we first should interpret a "name:: "as a full qualified package reference. I think that since both class scopes and package scopes can be followed by ::. we cannot assume that a name followed by a :: is going to be a fully qualified package reference. My interpretation is that : Z::F(i) is searched first in the scope where it appears: the interface IFC scope. In that scope, since there are no local symbols declared or explicit package imports for Z, it searches the list of the packages that are wild card imported and it will find the package A which contains a class called Z which contains a static function called F. The name resolution succeeds at that point. If there were no matching symbol for Z at that scope, I think that it should try to resolve the name as a full qualified package reference before going up the scopes and repeating the search. The order in which to resolve full qualified package references or class scope is not explicitly stated in the LRM. Francoise ' ________________________________ From: owner-sv-bc@eda-stds.org [mailto:owner-sv-bc@eda-stds.org] On Behalf Of Brad Pierce Sent: Sunday, July 23, 2006 3:36 AM To: sv-bc@eda-stds.org Subject: [sv-bc] Scope resolution operator and import::* Following up on http://www.eda-stds.org/svdb/bug_view_page.php?bug_id=0001216 http://www.eda-stds.org/svdb/bug_view_page.php?bug_id=0001546 Which function does the assignment assign o = Z::F(i); use in the following? package A; class Z; static function F(i); return i; endfunction:F endclass:Z endpackage:A package Z; function F(i); return ~i; endfunction:F endpackage:Z interface IFC(output o, input i); import A::*; assign o = Z::F(i); endinterface:IFC -- BradReceived on Mon Jul 24 06:53:03 2006
This archive was generated by hypermail 2.1.8 : Mon Jul 24 2006 - 06:53:12 PDT