RE: [sv-bc] Quick scope operator question

From: Mark Hartoog <Mark.Hartoog_at_.....>
Date: Tue Nov 21 2006 - 14:49:38 PST
> 
>    package p;
>      typedef p::T2 T;
>      typedef T T2;
>    endpackage

I think this example is illegal. When processing "typedef p::T2 T;"
there is no type 'T2' yet in package 'p', so this should be an
error. On the other hand:

    package p;
      typedef T2;
      typedef p::T2 T;
      typedef T T2;
    endpackage

does not have this problem, but does have the same circular type
reference.
Since you can create circular type references without the 'p::'
reference, and 
tools have to be prepared to detect that situation and flag it as an
error,
I don't see this as a reason to forbid this kind of reference.
Received on Tue Nov 21 14:49:56 2006

This archive was generated by hypermail 2.1.8 : Tue Nov 21 2006 - 14:50:02 PST