RE: [sv-ec] nesting classes inheritance

From: Mirek Forczek <mirekf_at_.....>
Date: Fri Feb 29 2008 - 08:01:21 PST
the A::x as it is inherited for A,



a similar situation is in case:

int x;
class A;
        function foo();
          x = 1; // which x?
        endfunction
      int x;
endclass

still the A::x is referenced, despite of the declaration comes later than it
is used in method body.

-----Original Message-----
From: Rich, Dave [mailto:Dave_Rich@mentor.com] 
Sent: 29 lutego 2008 16:55
To: Mirek Forczek; danielm
Cc: sv-ec@server.eda.org
Subject: RE: [sv-ec] nesting classes inheritance

int x;
class A;
      class AB extends A;
        function foo();
          x = 1; // which x?
        endfunction
      endclass
      int x;
endclass

> -----Original Message-----
> From: Mirek Forczek [mailto:mirekf@aldec.com.pl]
> Sent: Friday, February 29, 2008 7:41 AM
> To: Rich, Dave; 'danielm'
> Cc: sv-ec@server.eda.org
> Subject: RE: [sv-ec] nesting classes inheritance
> 
> There is nothing wrong when I'm extending A scope with AB definition
in
> such
> case:
> 
> class A;
>     class AB;
>     endclass
> endclass
> 
> the A scope has not been completed yet when compiler comes to 'class
AB'
> header,
> 
> 
> why this would be a problem in case:
> 
> class A;
>      class AB extends A;
>      endclass
> endclass
> 
> ?
> 
> (once the parsing will come to the end of the text, the A scope can be 
> considered as completed)
> 
> Mirek
> 
> -----Original Message-----
> From: Rich, Dave [mailto:Dave_Rich@mentor.com]
> Sent: 29 lutego 2008 16:32
> To: Mirek Forczek; danielm
> Cc: sv-ec@server.eda.org
> Subject: RE: [sv-ec] nesting classes inheritance
> 
> Recursive may not be the right word, but you are extending a scope
that
> has
> not been completed yet
> 
> > -----Original Message-----
> > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org]
> On
> > Behalf Of Mirek Forczek
> > Sent: Friday, February 29, 2008 2:07 AM
> > To: 'danielm'
> > Cc: sv-ec@server.eda.org
> > Subject: RE: [sv-ec] nesting classes inheritance
> >
> > nie ma tu zadnej rekursji - jakby co
> >
> > -----Original Message-----
> > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org]
> On
> > Behalf Of Neil Korpusik
> > Sent: 29 lutego 2008 02:36
> > To: danielm
> > Cc: sv-ec@server.eda.org
> > Subject: Re: [sv-ec] nesting classes inheritance
> >
> > Nested classes are allowed, but the example you are showing should
be
> > illegal since it is recursive. The LRM appears to be silent on this
> point.
> >
> > Neil
> >
> >
> >
> > danielm wrote:
> > > Should below be allowed or not?
> > >
> > > class A;
> > >     class AB extends A;
> > >     endclass
> > > endclass
> > >
> > > DANiel
> > >
> > > --
> > > This message has been scanned for viruses and dangerous content by
> > > *MailScanner* <http://www.mailscanner.info/>, 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.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Feb 29 08:04:47 2008

This archive was generated by hypermail 2.1.8 : Fri Feb 29 2008 - 08:05:06 PST