blob: 830ef72c702cc1b24e36da79fea53f6397823ab5 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// Preserve lineation of affected types or redo expected messages
@interface MtAn {}
public aspect DeclareMethodAnnotation {
// ------------------ affected types
static class Untyped {
void untypedName() {} // declare warning 16
void untypedPrefix_blah() {} // declare warning 17
void blah_untypedSuffix() {} // declare warning 18
}
static class Star {
void starName() {} // declare warning 22
void starPrefix_blah() {} // declare warning 23
void blah_starSuffix() {} // declare warning 24
}
static class Type{
void typeName() {} // declare warning 27
void typePrefix_blah() {} // declare warning 28
void blah_typeSuffix() {} // declare warning 29
}
static class TypePlus {
void typeplusName() {} // declare warning 33
void typeplusPrefix_blah() {} // declare warning 34
void blah_typeplusSuffix() {} // declare warning 35
}
static class TypePlusSubtype extends TypePlus {
void typeplusName() {} // declare warning 39
void typeplusPrefix_blah() {} // declare warning 40
void blah_typeplusSuffix() {} // declare warning 41
}
// ------------------ tests
declare @method: * untypedName() : @MtAn;
declare @method: * untypedPrefix*() : @MtAn;
declare @method: * *untypedSuffix() : @MtAn;
declare @method: * *.starName() : @MtAn;
declare @method: * *.starPrefix*() : @MtAn;
declare @method: * *.*starSuffix() : @MtAn;
declare @method: * Type.typeName() : @MtAn;
declare @method: * Type.typePrefix*() : @MtAn;
declare @method: * Type.*typeSuffix() : @MtAn;
declare @method: * TypePlus+.typeplusName() : @MtAn;
declare @method: * TypePlus+.typeplusPrefix*() : @MtAn;
declare @method: * TypePlus+.*typeplusSuffix() : @MtAn;
// ------------------ check using warnings, expected in .xml
declare warning : execution(@MtAn * *()): "all";
}
|