blob: e6662e281996521446695c8116a11adc02356d0b (
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
|
import org.aspectj.testing.Tester;
import java.io.*;
// PR#96
interface HttpConstants {
static final String s = "s";
}
public aspect FieldFromImplementsNotFound implements HttpConstants {
public static void main(String[] args) { test(); }
pointcut sendHeader():
call(void LocalFile.sendHeader());
static String aspectField = "t";
/*static*/ before(): sendHeader() {
aspectField += s;
}
public static void test() {
new LocalFile().sendHeader();
Tester.checkEqual(aspectField, "ts", "field + constant");
}
}
class LocalFile {
void sendHeader() {
}
}
|