aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs162/pr244830/PTW.java
blob: a45db9d1f507ee268f92301c9f454e5e12c9cddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.lang.reflect.*;

aspect X pertypewithin(A*) {
  before(): execution(* *(..)) {}
}

class A {
  public void foo() {}
}

class AA {
  public void foo() {}
}
public class PTW {
  public void foo() {}
  
  public static void main(String []argv) {
	  Field[] fs = X.class.getDeclaredFields();
	  for (int i=0;i<fs.length;i++) {
		  if (fs[i].getName().equals("ajc$initFailureCause")) {
			  throw new RuntimeException("Should be no ajc$initFailureCause field for ptw");
		  }
	  }
  }
}