RE: [sv-ec] A question about copy constructors

From: Arturo Salz <Arturo.Salz_at_.....>
Date: Tue Jan 16 2007 - 12:28:04 PST
That is not what mantis 1382 was about.

In the example p1 is of type c1 (the base class). I believe the question
is whether the shallow copy performs an auto-cast from p2 to p1 in this
case. I believe the answer is yes.

	Arturo

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of
Rich, Dave
Sent: Tuesday, January 16, 2007 11:44 AM
To: William Paulsen; sv-ec@eda-stds.org
Subject: RE: [sv-ec] A question about copy constructors

This was mantis 0001382 which was approved in September.

p1 will be point to an object of type c2.

Dave


> -----Original Message-----
> From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org]
On
> Behalf Of William Paulsen
> Sent: Tuesday, January 16, 2007 11:31 AM
> To: sv-ec@server.eda-stds.org
> Subject: [sv-ec] A question about copy constructors
> 
> Hi,
> 
> The LRM does not seem to be clear about the last statement in the
> example below.  Can someone clarify this?
> 
> Thanks,
> Bill Paulsen
> 
> 
> 
> module m;
>     class c1
>     endclass
> 
>     class c2 extends c1;
>     endclass
> 
>     class c3 extends c2;
>     endclass
> 
>     c3 p3 = new;
>     c2 p2 = p3;
>     c1 p1 = new p2;  // what is the type of the object: c1, c2, or c3?
> endmodule
> 
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Jan 16 12:28:27 2007

This archive was generated by hypermail 2.1.8 : Tue Jan 16 2007 - 12:28:50 PST