I raised this earlier as part of my long list of editorial and other
questions.
In 8.25.4, there is the following:
GetImp #() get_ref;
Fifo#() fifo_obj = new;
PutImp#() put_ref = fifo_obj;
...
$cast(get_ref, put_ref);
This violates the previous requirement that either "source is a subtype
of dest"
or "dest is a subtype of source" in order for the cast to be legal. Here
the get_ref and put_ref have unrelated types, other than the fact that they
each could feasibly contain a handle to a class that implements both
interface
classes.
In general, if we allow such casts, do we want to say anything about the
(static) legality of such casts or just have a run-time check
requirement in all
cases involving interface classes?
A static statement about legality would have to involve a more interesting
explanation of "feasible implementation paths" involving the types of
the expressions in the cast. Defining this as run-time only would
potentially result in very late error reporting. In any case, the rules
for this
will need to be explicitly aligned with the new rules we just passed in
3293.
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 Tue Jun 7 09:07:49 2011
This archive was generated by hypermail 2.1.8 : Tue Jun 07 2011 - 09:07:53 PDT