Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Is it a bug in the declare parents involving interfaces?

Hi all,

Consider the following code:

public interface I {}

public interface I2 {
  public class InnerClass{
   public static int i;
  }
}

public aspect A {

  declare parents: I extends I2;

  before(): execution(* I+.(..)){
    boolean b = I.InnerClass.i >= 0;
  }
}

This code does not compile when I use the declare parents. It does not recognize the inherited inner class. So, it complains when trying to access the static field i. If I comment the declare parents line, and explicitly make the interface I to extend the Interface I2, the code compiles. Is there something wrong? or Is it a compiler's bug related to the declare parents?

cheers,
Henrique
--
...............................................................................................................................
Henrique Rebelo
http://www.cin.ufpe.br/~hemr
Informatics Center, UFPE, Brazil

Back to the top