RE: [sv-ec]Email Vote: Response requested by Monday June 6 2011 9:00am

From: Francoise Martinolle <fm@cadence.com>
Date: Mon Jun 06 2011 - 08:25:04 PDT

Arturo, Gordon,

How about if I use bullets to make the sentence easier to read:

The return type of a virtual function shall either be
 - a matching type (see 6,22.1)
- or a derived class type

of the return type of the virtual function in the super class.

I think that putting the reference to the matching types descriptions in the LRM should be sufficient. I do not want to
repeat what is a matching type.
I agree that extending the example a bit to use type parameters is good.

I am going to make a new version of this with these changes that I will upload to mantis right now.

Francoise
       '

________________________________
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Arturo Salz
Sent: Friday, June 03, 2011 2:54 PM
To: Mehdi Mohtashemi; sv-ec@eda.org
Subject: RE: [sv-ec]Email Vote: Response requested by Monday June 6 2011 9:00am

1) Mantis 3278 ___Yes _X_No

The current sentence on covariant return types is a bit hard to parse - how about the following change:

The return type of a virtual method function shall be either be a matching type or a derived class type of the return type (of the virtual method) in the super class.

Also, the final example is too narrowly defined. It only shows the simplest case (that of a matching type via a typedef). It should discuss matching types via parameter overrides (and perhaps some verbiage to that effect may be needed):

typedef int T; // T and int are matching datatypes.

class C;

           virtual function C some_method(int a); endfunction

endclass

class D extends C;

           virtual function D some_method(T a); endfunction

endclass

class E #(type Y) extends C;

           virtual function D some_method(Y a); endfunction

endclass

E#(int) e1; // OK - class specialization has matching types

E#(logic) e2; // Error - no matching types in class specialization

(2) Mantis 3279 _X_Yes ___No

CLOSE: [already merged into 3278]

(3) Mantis 3293 _X_Yes ___No

--
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<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.
Received on Mon Jun 6 08:25:37 2011

This archive was generated by hypermail 2.1.8 : Mon Jun 06 2011 - 08:25:39 PDT