[sv-ec] forward declaration of a parameterized classes

From: Neil Korpusik <Neil.Korpusik_at_.....>
Date: Fri Sep 07 2007 - 16:27:08 PDT
<I think this was meant to go to the alias>

-------- Original Message --------
Subject: 	forward declaration of a parameterized classes
Date: 	Fri, 07 Sep 2007 16:09:25 -0700
From: 	Don Mills <mills@lcdm-eng.com>
Reply-To: 	mills@lcdm-eng.com
Organization: 	LCDM Engineering
To: 	owner-sv-ec@eda.org



Can I combine section 8.24 and 8.25 (draft 3a) for the following code?
IE can I use forward declarations on classes that are parameterizable?
I don't see anything in the LRM that prevents this.

program test;
  //typedef class b_c #(type T int);
  typedef class b_c;

  class a_c #(type T = int);
    int a1;
    function void set (b_c b);
      b.b1 = 5;
    endfunction
  endclass

  class b_c # (type T = int);
    int b1;
    function void set (a_c a);
      a.a1 = 4;
    endfunction
  endclass
endprogram



-- 
==========================================================
Don Mills
mills@lcdm-eng.com
www.lcdm-eng.com
==========================================================





-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Sep 7 16:47:54 2007

This archive was generated by hypermail 2.1.8 : Fri Sep 07 2007 - 16:48:29 PDT