blob: 5f4a3c528f0b32d8a00c78c1f995c86c260aa32b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import org.aspectj.testing.Tester;
/** @testcase PR#52107 declare String field on interface */
public class StringFieldOnInterface implements Runnable {
public static void main(String[] args) {
Tester.expectEvent("length=1");
new StringFieldOnInterface().blah();
Tester.checkAllEvents();
}
public void run() {
}
}
aspect A {
public String Runnable.name = "a";
public void Runnable.blah() {
int i = name.length();
Tester.event("length="+i);
}
}
|