Gordon, I think that the rule should be generalized to apply to all class specializations of the class itself, not just the default specialization. No class specialization datatype of the class can be referenced until the ; is reached. RIght? Francoise ' -----Original Message----- From: Gordon Vreugdenhil [mailto:gordonv@model.com] Sent: Friday, May 09, 2008 2:27 PM To: Francoise Martinolle Cc: sv-ec@eda.org Subject: Re: [sv-ec] class datatype Francoise Martinolle wrote: > I am wondering if the following is legal: > > class base #(parameter i = 0, j = base::i); endclass First, I do think that: class base #(parameter i = 0, j = i); endclass is fine; I assume that there is no question on that. However, in your example, there is an assumption that I think you are making with which I disagree. The assumption is that in this context the name "base" is the name of the scope and not the name of the default specialization. As of the current Draft 5 LRM language, it is pretty clear that the only time in which a parameterized class name does NOT refer to the default specialization is when one is defining the return type (or the name) of an extern method. So in this case, I would consider "base::i" to mean "the parameter value or 'i' in the default specialization". In that narrow situation (when talking about only the base), I think you do have an issue related to the one that you are talking about -- a more explicit but equivalent question is when the base type of "base#()::i" comes into existence with respect to an in-progress specialization of the the default type. That is indeed touchy and there are some interesting (and much worse) type problems lurking behind the question. My opinion at this point is that the default **type** doesn't actually come into existence early enough to refer to itself in the parameter list. At some point we should discuss the issues related to that but for now, I'd consider it illegal to refer to "base" within the defaults of its parameters. Gord. > > or > > class base #(parameter i = base::j, j = 1); > > When is the class datatype "base" defined? immediately after the name > base or when the semi colon of the class declaration is reached. > I assume the latter but is there any language in the LRM to specify this? > > Francoise > ' > > -- > This message has been scanned for viruses and dangerous content by > *MailScanner* <http://www.mailscanner.info/>, and is believed to be > clean. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri May 9 11:43:36 2008
This archive was generated by hypermail 2.1.8 : Fri May 09 2008 - 11:43:46 PDT