[sv-bc] Re: [sv-ec] Query regarding overriding of parent scope semantics in child scope.

From: Steven Sharp <sharp_at_.....>
Date: Sat Sep 08 2007 - 07:27:51 PDT
>From: Sandeep Dasgupta <sandeep@cal.interrasystems.com>

>I have a query regarding the following testcase,
>/
>module top;
>          typedef int  myint ;
>
>           task t1;
>               input  myint;           //       
>           endtask
>endmodule

I can imagine that this testcase could cause problems for a parser
that did not handle this situation properly.  Until the semicolon
is reached, the myint looks like a reference to the type.  But
the example is legal, and should compile successfully.


>/Could the above testcase be considered as a positive one.

Yes.


>Also is it  necessary to report error at "/input  myint;  /" so as to 
>avoid the name space clash.

No, there is no error.  There is no name space clash, since the
argument name is in a different scope than the type name.


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 Sat Sep 8 07:29:56 2007

This archive was generated by hypermail 2.1.8 : Sat Sep 08 2007 - 07:30:06 PDT