[sv-ec] Issue 64 / Mantis 2598 - references to parameters in parameterized classes

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Fri Apr 24 2009 - 10:14:38 PDT
Mantis 2598 uses the following example:

   class C #(type TC = int);
      parameter type LTC = real;
   endclass


Question:

    1) Is "C::TC i;" legal?

    No -- the first paragraph of 8.24.1 is clear that "::"
    is not legal for a parameterized class in this context.

    2) Is "super.TC or super.LTC" legal?

    No -- at this point the only legal "dotted name" with a
    type is the interface_name form defined for typedefs in
    6.18.

    Note -- I would not object to allowing super.TYPE_NAME
    as a type reference in the context of a typedef.

    3) is C#()::TC legal?

    Yes.  In 8.24.1 we have:
         When referring to the default specialization as the
         prefix to the class resolution operator, the explicit
         default specialization form of #() shall be used.

    So C#()::TC refers to the type TC within the default
    specialization of C (i.e. int).


I don't think we need to take any action here unless there
are additional questions.


Gord

-- 
--------------------------------------------------------------------
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 Apr 24 10:16:34 2009

This archive was generated by hypermail 2.1.8 : Fri Apr 24 2009 - 10:16:43 PDT