Skip to content

Commit 0f9afca

Browse files
committed
K2: library-tests/annotation_classes: Accept changes
1 parent 2151b6d commit 0f9afca

File tree

2 files changed

+99
-99
lines changed

2 files changed

+99
-99
lines changed

java/ql/test-kotlin2/library-tests/annotation_classes/PrintAst.expected

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -22,64 +22,64 @@ Annot1j.java:
2222
def.kt:
2323
# 0| [CompilationUnit] def
2424
# 0| 1: [Class] DefKt
25-
# 46| 2: [Method] fn
25+
# 45| 2: [Method] fn
2626
#-----| 1: (Annotations)
2727
# 45| 1: [Annotation] Annot0k
28-
# 0| 1: [IntegerLiteral] 0
28+
# 21| 1: [IntegerLiteral] 0
2929
#-----| 2: (Generic Parameters)
3030
# 46| 0: [TypeVariable] T
31-
# 46| 3: [TypeAccess] Unit
31+
# 45| 3: [TypeAccess] Unit
3232
#-----| 4: (Parameters)
3333
# 46| 0: [Parameter] a
3434
#-----| -1: (Annotations)
3535
# 46| 1: [Annotation] Annot0k
36-
# 0| 1: [IntegerLiteral] 0
36+
# 21| 1: [IntegerLiteral] 0
3737
# 46| 0: [TypeAccess] Annot0k
3838
# 46| 5: [BlockStmt] { ... }
3939
# 47| 0: [ExprStmt] <Expr>;
4040
# 47| 0: [MethodCall] println(...)
4141
# 47| -1: [TypeAccess] ConsoleKt
4242
# 47| 0: [MethodCall] a(...)
4343
# 47| -1: [VarAccess] a
44-
# 50| 1: [LocalVariableDeclStmt] var ...;
45-
# 50| 1: [LocalVariableDeclExpr] x
44+
# 49| 1: [LocalVariableDeclStmt] var ...;
45+
# 49| 1: [LocalVariableDeclExpr] x
4646
# 50| 0: [IntegerLiteral] 10
47-
# 53| 3: [FieldDeclaration] int p;
47+
# 53| 3: [Method] getP
48+
#-----| 1: (Annotations)
49+
# 54| 1: [Annotation] Annot0k
50+
# 21| 1: [IntegerLiteral] 0
51+
# 53| 3: [TypeAccess] int
52+
# 53| 5: [BlockStmt] { ... }
53+
# 53| 0: [ReturnStmt] return ...
54+
# 53| 0: [VarAccess] DefKt.p
55+
# 53| -1: [TypeAccess] DefKt
56+
# 53| 4: [FieldDeclaration] int p;
4857
#-----| -2: (Annotations)
4958
# 56| 1: [Annotation] Annot0k
50-
# 0| 1: [IntegerLiteral] 0
59+
# 21| 1: [IntegerLiteral] 0
5160
# 53| -1: [TypeAccess] int
5261
# 57| 0: [IntegerLiteral] 5
53-
# 57| 4: [Method] getP
54-
#-----| 1: (Annotations)
55-
# 54| 1: [Annotation] Annot0k
56-
# 0| 1: [IntegerLiteral] 0
57-
# 57| 3: [TypeAccess] int
58-
# 57| 5: [BlockStmt] { ... }
59-
# 57| 0: [ReturnStmt] return ...
60-
# 57| 0: [VarAccess] DefKt.p
61-
# 57| -1: [TypeAccess] DefKt
62-
# 57| 5: [Method] setP
62+
# 53| 5: [Method] setP
6363
#-----| 1: (Annotations)
6464
# 55| 1: [Annotation] Annot0k
65-
# 0| 1: [IntegerLiteral] 0
66-
# 57| 3: [TypeAccess] Unit
65+
# 21| 1: [IntegerLiteral] 0
66+
# 53| 3: [TypeAccess] Unit
6767
#-----| 4: (Parameters)
68-
# 57| 0: [Parameter] <set-?>
69-
# 57| 0: [TypeAccess] int
70-
# 57| 5: [BlockStmt] { ... }
71-
# 57| 0: [ExprStmt] <Expr>;
72-
# 57| 0: [AssignExpr] ...=...
73-
# 57| 0: [VarAccess] DefKt.p
74-
# 57| -1: [TypeAccess] DefKt
75-
# 57| 1: [VarAccess] <set-?>
68+
# 53| 0: [Parameter] <set-?>
69+
# 53| 0: [TypeAccess] int
70+
# 53| 5: [BlockStmt] { ... }
71+
# 53| 0: [ExprStmt] <Expr>;
72+
# 53| 0: [AssignExpr] ...=...
73+
# 53| 0: [VarAccess] DefKt.p
74+
# 53| -1: [TypeAccess] DefKt
75+
# 53| 1: [VarAccess] <set-?>
7676
# 59| 6: [ExtensionMethod] myExtension
7777
# 59| 3: [TypeAccess] Unit
7878
#-----| 4: (Parameters)
7979
# 59| 0: [Parameter] <this>
8080
#-----| -1: (Annotations)
8181
# 59| 1: [Annotation] Annot0k
82-
# 0| 1: [IntegerLiteral] 0
82+
# 21| 1: [IntegerLiteral] 0
8383
# 59| 0: [TypeAccess] String
8484
# 59| 5: [BlockStmt] { ... }
8585
# 5| 2: [Interface] Annot0k
@@ -111,32 +111,32 @@ def.kt:
111111
# 5| 1: [ArrayInit] {...}
112112
# 5| 1: [VarAccess] AnnotationTarget.CLASS
113113
# 5| -1: [TypeAccess] AnnotationTarget
114-
# 5| 2: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
115-
# 5| -1: [TypeAccess] AnnotationTarget
116-
# 5| 3: [VarAccess] AnnotationTarget.TYPE_PARAMETER
117-
# 5| -1: [TypeAccess] AnnotationTarget
118-
# 5| 4: [VarAccess] AnnotationTarget.PROPERTY
119-
# 5| -1: [TypeAccess] AnnotationTarget
120-
# 5| 5: [VarAccess] AnnotationTarget.FIELD
121-
# 5| -1: [TypeAccess] AnnotationTarget
122-
# 5| 6: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
123-
# 5| -1: [TypeAccess] AnnotationTarget
124-
# 5| 7: [VarAccess] AnnotationTarget.VALUE_PARAMETER
125-
# 5| -1: [TypeAccess] AnnotationTarget
126-
# 5| 8: [VarAccess] AnnotationTarget.CONSTRUCTOR
127-
# 5| -1: [TypeAccess] AnnotationTarget
128-
# 5| 9: [VarAccess] AnnotationTarget.FUNCTION
129-
# 5| -1: [TypeAccess] AnnotationTarget
130-
# 5| 10: [VarAccess] AnnotationTarget.PROPERTY_GETTER
131-
# 5| -1: [TypeAccess] AnnotationTarget
132-
# 5| 11: [VarAccess] AnnotationTarget.PROPERTY_SETTER
133-
# 5| -1: [TypeAccess] AnnotationTarget
134-
# 5| 12: [VarAccess] AnnotationTarget.TYPE
135-
# 5| -1: [TypeAccess] AnnotationTarget
136-
# 5| 13: [VarAccess] AnnotationTarget.FILE
137-
# 5| -1: [TypeAccess] AnnotationTarget
138-
# 5| 14: [VarAccess] AnnotationTarget.TYPEALIAS
139-
# 5| -1: [TypeAccess] AnnotationTarget
114+
# 6| 2: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
115+
# 6| -1: [TypeAccess] AnnotationTarget
116+
# 7| 3: [VarAccess] AnnotationTarget.TYPE_PARAMETER
117+
# 7| -1: [TypeAccess] AnnotationTarget
118+
# 8| 4: [VarAccess] AnnotationTarget.PROPERTY
119+
# 8| -1: [TypeAccess] AnnotationTarget
120+
# 9| 5: [VarAccess] AnnotationTarget.FIELD
121+
# 9| -1: [TypeAccess] AnnotationTarget
122+
# 10| 6: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
123+
# 10| -1: [TypeAccess] AnnotationTarget
124+
# 11| 7: [VarAccess] AnnotationTarget.VALUE_PARAMETER
125+
# 11| -1: [TypeAccess] AnnotationTarget
126+
# 12| 8: [VarAccess] AnnotationTarget.CONSTRUCTOR
127+
# 12| -1: [TypeAccess] AnnotationTarget
128+
# 13| 9: [VarAccess] AnnotationTarget.FUNCTION
129+
# 13| -1: [TypeAccess] AnnotationTarget
130+
# 14| 10: [VarAccess] AnnotationTarget.PROPERTY_GETTER
131+
# 14| -1: [TypeAccess] AnnotationTarget
132+
# 15| 11: [VarAccess] AnnotationTarget.PROPERTY_SETTER
133+
# 15| -1: [TypeAccess] AnnotationTarget
134+
# 16| 12: [VarAccess] AnnotationTarget.TYPE
135+
# 16| -1: [TypeAccess] AnnotationTarget
136+
# 18| 13: [VarAccess] AnnotationTarget.FILE
137+
# 18| -1: [TypeAccess] AnnotationTarget
138+
# 19| 14: [VarAccess] AnnotationTarget.TYPEALIAS
139+
# 19| -1: [TypeAccess] AnnotationTarget
140140
# 21| 1: [Method] a
141141
#-----| 1: (Annotations)
142142
# 21| 1: [Annotation] JvmName
@@ -148,7 +148,7 @@ def.kt:
148148
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
149149
# 0| -1: [TypeAccess] RetentionPolicy
150150
# 23| 2: [Annotation] Annot0k
151-
# 0| 1: [IntegerLiteral] 0
151+
# 21| 1: [IntegerLiteral] 0
152152
# 25| 1: [Method] a
153153
# 25| 3: [TypeAccess] int
154154
# 26| 2: [Method] b
@@ -169,26 +169,26 @@ def.kt:
169169
# 33| 0: [SuperConstructorInvocationStmt] super(...)
170170
# 33| 1: [BlockStmt] { ... }
171171
# 34| 5: [Class] Y
172-
# 0| 2: [Method] getEntries
173-
# 0| 3: [TypeAccess] EnumEntries<Y>
174-
# 0| 0: [TypeAccess] Y
175-
# 0| 3: [Method] valueOf
176-
# 0| 3: [TypeAccess] Y
177-
#-----| 4: (Parameters)
178-
# 0| 0: [Parameter] value
179-
# 0| 0: [TypeAccess] String
180-
# 0| 4: [Method] values
181-
# 0| 3: [TypeAccess] Y[]
182-
# 0| 0: [TypeAccess] Y
183-
# 34| 5: [Constructor] Y
172+
# 34| 2: [Constructor] Y
184173
# 34| 5: [BlockStmt] { ... }
185174
# 34| 0: [ExprStmt] <Expr>;
186-
# 34| 0: [ClassInstanceExpr] new Enum(...)
175+
# 34| 0: [ClassInstanceExpr] new Enum<Y>(...)
187176
# 34| -3: [TypeAccess] Enum<Y>
188177
# 34| 0: [TypeAccess] Y
189178
# 34| 0: [NullLiteral] null
190179
# 34| 1: [IntegerLiteral] 0
191180
# 34| 1: [BlockStmt] { ... }
181+
# 34| 3: [Method] getEntries
182+
# 34| 3: [TypeAccess] EnumEntries<Y>
183+
# 34| 0: [TypeAccess] Y
184+
# 34| 4: [Method] valueOf
185+
# 34| 3: [TypeAccess] Y
186+
#-----| 4: (Parameters)
187+
# 34| 0: [Parameter] value
188+
# 34| 0: [TypeAccess] String
189+
# 34| 5: [Method] values
190+
# 34| 3: [TypeAccess] Y[]
191+
# 34| 0: [TypeAccess] Y
192192
# 35| 6: [FieldDeclaration] Y A;
193193
# 35| -1: [TypeAccess] Y
194194
# 35| 0: [ClassInstanceExpr] new Y(...)
@@ -206,26 +206,26 @@ def.kt:
206206
# 38| 1: [Annotation] Annot0k
207207
# 38| 1: [IntegerLiteral] 1
208208
# 39| 2: [Annotation] Annot1k
209-
# 0| 1: [IntegerLiteral] 2
210-
# 0| 2: [StringLiteral] "ab"
211-
# 0| 3: [TypeLiteral] X.class
212-
# 0| 0: [TypeAccess] X
213-
# 0| 4: [Annotation] Annot0k
214-
# 0| 1: [IntegerLiteral] 1
209+
# 25| 1: [IntegerLiteral] 2
210+
# 26| 2: [StringLiteral] "ab"
211+
# 27| 3: [TypeLiteral] X.class
212+
# 27| 0: [TypeAccess] X
213+
# 30| 4: [Annotation] Annot0k
214+
# 30| 1: [IntegerLiteral] 1
215215
# 39| 5: [VarAccess] Y.B
216216
# 39| -1: [TypeAccess] Y
217217
# 39| 6: [ArrayInit] {...}
218218
# 39| 1: [VarAccess] Y.C
219219
# 39| -1: [TypeAccess] Y
220220
# 39| 2: [VarAccess] Y.A
221221
# 39| -1: [TypeAccess] Y
222-
# 42| 1: [Constructor] Z
222+
# 41| 1: [Constructor] Z
223223
#-----| 1: (Annotations)
224224
# 41| 1: [Annotation] Annot0k
225-
# 0| 1: [IntegerLiteral] 0
225+
# 21| 1: [IntegerLiteral] 0
226226
# 41| 5: [BlockStmt] { ... }
227227
# 42| 0: [SuperConstructorInvocationStmt] super(...)
228-
# 42| 1: [BlockStmt] { ... }
228+
# 41| 1: [BlockStmt] { ... }
229229
use.java:
230230
# 0| [CompilationUnit] use
231231
# 1| 1: [Class] use

java/ql/test-kotlin2/library-tests/annotation_classes/classes.expected

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ annotationDeclarations
1717
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:8:7:8:7 | d |
1818
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:10:9:10:9 | e |
1919
| Annot1j.java:1:19:1:25 | Annot1j | Annot1j.java:12:13:12:13 | f |
20-
| def.kt:5:1:21:60 | Annot0k | def.kt:21:44:21:59 | a |
20+
| def.kt:5:1:21:60 | Annot0k | def.kt:21:26:21:59 | a |
2121
| def.kt:23:1:31:1 | Annot1k | def.kt:25:5:25:18 | a |
2222
| def.kt:23:1:31:1 | Annot1k | def.kt:26:5:26:24 | b |
2323
| def.kt:23:1:31:1 | Annot1k | def.kt:27:5:27:31 | c |
2424
| def.kt:23:1:31:1 | Annot1k | def.kt:28:5:28:18 | d |
2525
| def.kt:23:1:31:1 | Annot1k | def.kt:29:5:29:32 | e |
2626
| def.kt:23:1:31:1 | Annot1k | def.kt:30:5:30:31 | f |
2727
annotations
28-
| def.kt:0:0:0:0 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k |
2928
| def.kt:23:1:23:8 | Annot0k | def.kt:23:1:31:1 | Annot1k | def.kt:5:1:21:60 | Annot0k |
29+
| def.kt:30:22:30:31 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k |
3030
| def.kt:38:1:38:17 | Annot0k | def.kt:38:1:43:1 | Z | def.kt:5:1:21:60 | Annot0k |
3131
| def.kt:39:1:39:40 | Annot1k | def.kt:38:1:43:1 | Z | def.kt:23:1:31:1 | Annot1k |
32-
| def.kt:41:5:41:12 | Annot0k | def.kt:42:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k |
33-
| def.kt:45:1:45:8 | Annot0k | def.kt:46:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k |
32+
| def.kt:41:5:41:12 | Annot0k | def.kt:41:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k |
33+
| def.kt:45:1:45:8 | Annot0k | def.kt:45:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k |
3434
| def.kt:46:21:46:28 | Annot0k | def.kt:46:21:46:39 | a | def.kt:5:1:21:60 | Annot0k |
35-
| def.kt:54:1:54:12 | Annot0k | def.kt:57:1:57:23 | getP | def.kt:5:1:21:60 | Annot0k |
36-
| def.kt:55:1:55:12 | Annot0k | def.kt:57:1:57:23 | setP | def.kt:5:1:21:60 | Annot0k |
35+
| def.kt:54:1:54:12 | Annot0k | def.kt:53:1:57:23 | getP | def.kt:5:1:21:60 | Annot0k |
36+
| def.kt:55:1:55:12 | Annot0k | def.kt:53:1:57:23 | setP | def.kt:5:1:21:60 | Annot0k |
3737
| def.kt:56:1:56:14 | Annot0k | def.kt:53:1:57:23 | p | def.kt:5:1:21:60 | Annot0k |
3838
| def.kt:59:5:59:21 | Annot0k | def.kt:59:5:59:28 | <this> | def.kt:5:1:21:60 | Annot0k |
3939
| use.java:10:5:10:21 | Annot0j | use.java:14:18:14:18 | Z | Annot0j.java:1:19:1:25 | Annot0j |
@@ -43,27 +43,27 @@ annotations
4343
| use.java:13:5:13:88 | Annot1k | use.java:14:18:14:18 | Z | def.kt:23:1:31:1 | Annot1k |
4444
| use.java:13:73:13:87 | Annot0k | use.java:13:5:13:88 | Annot1k | def.kt:5:1:21:60 | Annot0k |
4545
annotationValues
46-
| def.kt:0:0:0:0 | Annot0k | def.kt:0:0:0:0 | 1 |
4746
| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
4847
| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
4948
| def.kt:0:0:0:0 | Target | def.kt:0:0:0:0 | {...} |
50-
| def.kt:5:1:20:1 | Target | def.kt:5:9:5:30 | {...} |
49+
| def.kt:5:1:20:1 | Target | def.kt:5:9:19:30 | {...} |
5150
| def.kt:21:26:21:42 | JvmName | def.kt:21:39:21:41 | "a" |
52-
| def.kt:23:1:23:8 | Annot0k | def.kt:0:0:0:0 | 0 |
51+
| def.kt:23:1:23:8 | Annot0k | def.kt:21:59:21:59 | 0 |
52+
| def.kt:30:22:30:31 | Annot0k | def.kt:30:30:30:30 | 1 |
5353
| def.kt:38:1:38:17 | Annot0k | def.kt:38:16:38:16 | 1 |
54-
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | 2 |
55-
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | "ab" |
56-
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | Annot0k |
57-
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | X.class |
58-
| def.kt:39:1:39:40 | Annot1k | def.kt:39:14:39:16 | Y.B |
54+
| def.kt:39:1:39:40 | Annot1k | def.kt:25:18:25:18 | 2 |
55+
| def.kt:39:1:39:40 | Annot1k | def.kt:26:21:26:24 | "ab" |
56+
| def.kt:39:1:39:40 | Annot1k | def.kt:27:24:27:31 | X.class |
57+
| def.kt:39:1:39:40 | Annot1k | def.kt:30:22:30:31 | Annot0k |
58+
| def.kt:39:1:39:40 | Annot1k | def.kt:39:16:39:16 | Y.B |
5959
| def.kt:39:1:39:40 | Annot1k | def.kt:39:23:39:39 | {...} |
60-
| def.kt:41:5:41:12 | Annot0k | def.kt:0:0:0:0 | 0 |
61-
| def.kt:45:1:45:8 | Annot0k | def.kt:0:0:0:0 | 0 |
62-
| def.kt:46:21:46:28 | Annot0k | def.kt:0:0:0:0 | 0 |
63-
| def.kt:54:1:54:12 | Annot0k | def.kt:0:0:0:0 | 0 |
64-
| def.kt:55:1:55:12 | Annot0k | def.kt:0:0:0:0 | 0 |
65-
| def.kt:56:1:56:14 | Annot0k | def.kt:0:0:0:0 | 0 |
66-
| def.kt:59:5:59:21 | Annot0k | def.kt:0:0:0:0 | 0 |
60+
| def.kt:41:5:41:12 | Annot0k | def.kt:21:59:21:59 | 0 |
61+
| def.kt:45:1:45:8 | Annot0k | def.kt:21:59:21:59 | 0 |
62+
| def.kt:46:21:46:28 | Annot0k | def.kt:21:59:21:59 | 0 |
63+
| def.kt:54:1:54:12 | Annot0k | def.kt:21:59:21:59 | 0 |
64+
| def.kt:55:1:55:12 | Annot0k | def.kt:21:59:21:59 | 0 |
65+
| def.kt:56:1:56:14 | Annot0k | def.kt:21:59:21:59 | 0 |
66+
| def.kt:59:5:59:21 | Annot0k | def.kt:21:59:21:59 | 0 |
6767
| use.java:10:5:10:21 | Annot0j | use.java:10:20:10:20 | 1 |
6868
| use.java:11:5:11:90 | Annot1j | use.java:11:18:11:18 | 1 |
6969
| use.java:11:5:11:90 | Annot1j | use.java:11:25:11:28 | "ac" |

0 commit comments

Comments
 (0)