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

From: Krzysztof Konopko <Krzysztof.Konopko_at_.....>
Date: Thu Feb 28 2008 - 23:11:52 PST
Similar issue is when trying to extend outer class with nested class
 
class Outer
  class Inner extends Outer;
  endclass
endclass
 
Shall it be allowed?
 
Regards,
Krzysztof Konopko
 
From: Surya Pratik Saha <spsaha_at_.....
<mailto:spsaha_at_.....?Subject=Re:%20[sv-bc]%20Forward%20reference%20of
%20class%20used%20as%20base%20class> > 
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 Thu Feb 28 23:12:27 2008

This archive was generated by hypermail 2.1.8 : Thu Feb 28 2008 - 23:12:38 PST