[sv-ec] question for forward type declarations of classes

From: Francoise Martinolle <fm_at_.....>
Date: Mon Sep 08 2008 - 10:41:35 PDT
Someone can do a forward type declaration to a class type.
The LRM says:
 
"

The actual data type definition of a forward typedef declaration shall
be resolved within the same local

scope or generate block. It shall be an error if the type_identifier
does not resolve to a data type. It shall be

an error if a basic data type was specified by the forward type
declaration and the actual type definition does

not conform to the specified basic data type.

"

With the above wording the example below is legal SV:  we can have a fwd
type of another typedef 
as long as this other typedef is a typedef of a class type.
correct?
 
See ex:
 
module top;
typedef class fwd_class;
 
class C;
   task t (fwd_class v);
   endtask
endclass
 
class bar;
endclass
 
typedef bar fwd_class;
 
endmodule

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Sep 8 10:42:34 2008

This archive was generated by hypermail 2.1.8 : Mon Sep 08 2008 - 10:42:48 PDT