But then the compiler error should happen when multiple aspects are ACTUALLY 
instantiated, not on the abstract aspect itself. Multiple subaspects 
instantiated with different types is actually exactly what I wanted to achieve. 
Conflicts can be avoided by not instantiating all the subaspects at the same 
time, or I can a compile error if I did. The conflict can be detected by type 
checking, I believe.

Charles
 
==============
Yawn !!

----- Original Message ----
From: Ramnivas Laddad <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, August 22, 2007 1:48:27 PM
Subject: Re: [aspectj-users] Generic aspect oddity

It looks like correct behavior.

If Line B was legal, multiple subaspects instantiated with T bound to different 
types would lead to conflicting type for Tester.v.

-Ramnivas


On 8/22/07, Charles Zhang <[EMAIL PROTECTED]> wrote:
Hi, aspectj gods, here is what I don't get, for the following code, line A is 
OK, line B is not. The error is :

Cannot make a static reference to the non-static type T

Code:

class IteratorContainer<T extends Iterator>{


}
public abstract aspect AspectTest<T extends Iterator> {
    //Line A private HashMap<Integer, IteratorContainer<T>> v;
    //Line B private HashMap<Integer, IteratorContainer<T>> 
Tester.v;
}

I'm trying to ITD to the class type Tester.

Where did I do wrong?

Charles


==============
Yawn !!


_______________________________________________
aspectj-users mailing list

[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users







_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to