blob: 962a9ed045d5465eb9fee3251c0ce986c3ee40ca (
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 subtype pattern in dominates should pick out aspect subtypes */
public class DominatesTypePatternCE {
public static void main (String[] args) {
String s = new C().method();
Tester.check("pass".equals(s),
"\"pass\".equals(\"" + s + "\")");
}
}
class C {}
// works if A is specified explicitly
abstract aspect AA { declare precedence: AA, AA+; // CE, AA is matched by both pieces
public String C.method() { return "pass"; }
}
aspect A extends AA {
public String C.method() { return "fail"; }
}
|