[sv-bc] Forward reference of class used as base class

From: Surya Pratik Saha <spsaha_at_.....>
Date: Tue Jan 22 2008 - 04:51:06 PST
Hi,
Is base class of a class declaration allowed to be forward referenced? 
Is the following case valid?

module top;
typedef class bas;
class der extends bas;
endclass
class bas;
endclass
endmodule

Most of the simulators fail for that. But I did not see any restriction 
inside LRM. If it is allowed, then I am little bit curious on the 
following case:

module top;
chandle x;
typedef class bas;
class der extends bas;
   function new;
       x = 1;
   endfunction
endclass
class bas;
   int x;
endclass
endmodule

What 'x' will be referred for function 'new', is it 'chandle' or 'int'?

-- 
Regards
Surya





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jan 22 05:12:02 2008

This archive was generated by hypermail 2.1.8 : Tue Jan 22 2008 - 05:12:32 PST