Re: [sv-ec] Re: [sv-bc] Re: Feedback from Freescale on name resolution issues

From: Michael Burns <michael.burns_at_.....>
Date: Thu Oct 18 2007 - 17:14:12 PDT
Well, in the context of an inline constraint, what if the constrained object had 
a field with the same name as the enclosing scope? For example,

class foo;
   int x;
endclass

class bar;
   foo f;
endclass

bar b = new();

funtion f(int x);
   b.randomize() with { f.x < 12;};
endfunction

Do we still have the same problem?

--Mike

Steven Sharp wrote:
> Mike has mentioned that there is no way to disambiguate a reference in
> favor of a local variable if that variable is automatic.
> 
> The rule disallowing hierarchical references to automatic variables was
> intended to prevent references from outside the scope, where the variable
> might not exist, or where there might be multiple instances of the variable
> in existence simultaneously.
> 
> I don't see a problem with allowing a hierarchical reference to an
> automatic variable from inside its scope, where the hierarchy is just
> intended for name disambiguation.  Would this help?  Does anyone else see
> a problem with this?
> 
> Steven Sharp
> sharp@cadence.com
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Oct 18 17:14:41 2007

This archive was generated by hypermail 2.1.8 : Thu Oct 18 2007 - 17:15:03 PDT