I have a simple code:

public class Main() {

        public static void main(String[] args) {

                Coor p = new Cart(0.1, 0.2);
        }
}

public class Cart extends Coor {

        public Cart(double x, double y) {
                a = x;
                b = y;  
        }

        public double getX() {
                return a;
        }

        public void setX(double x)      {
                a = x;
        }
}


public class Coor {

        double a;
        double b;

        public Coor() {

        }
}

and the aspect:



public aspect dynconst {

        pointcut fieldSet() : set(* (Cart || Coor).*);

        void around() : fieldSet() {
                System.out.println("set");
                proceed();
        }
}


in runtime a get an exception:

Exception in thread "main" java.lang.VerifyError: (class: Cart, method: a_aroundBody4 signature: (LCart;LCoor;D)V) Incompatible type for getting or setting field
at Main.main(Main.java:3)

What is the problem?

thanks in advance


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

Reply via email to