summaryrefslogtreecommitdiffstats
path: root/tests/java5/varargs/pr93356.aj
blob: 00a2fdb382ea823f13b95c775d99c9cbd324d1fa (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
27
28
29
30
31
32
33
34
35
36
// "Varargs with .. in pointcut"

class A{
	public A(int i, int... nums) {}
	public void b(int i, int... nums) {}
}
aspect B{
	///////// methods	
	declare warning: execution(* *.*(..)) : "a";
	declare warning: execution(* *.*(int,..)) : "b";
	declare warning: execution(* *.*(..,int...)) : "c";
	declare warning: execution(* *.*(int,..,int...)) : "d";
	declare warning: execution(* *.*(int,int ...,..)) : "e";
	
	declare warning: execution(* *.*(..,int,..,int ...,..)) : "k";
	declare warning: execution(* *.*(..,..,*...,..,..)) : "l";
	
	
	declare warning: execution(* *.*(int,int [],..)) : "shouldn't match A";
	declare warning: execution(* *.*(int,int [])) : "shouldn't match B";
	
	//////////////////// constructors
	declare warning: execution(*.new(..)) : "f"; // matches  constructors for A and B
	declare warning: execution(*.new(int,..)) : "g";
	declare warning: execution(*.new(..,int...)) : "h";
	declare warning: execution(*.new(int,..,int...)) : "i";
	declare warning: execution(*.new(int,int ...,..)) : "j";
	
	declare warning: execution(*.new(int,int [],..)) : "shouldn't match C";
	declare warning: execution(*.new(int,int [])) : "shouldn't match D";
}