Skip to content

Commit b4534fe

Browse files
committed
K2: library-tests/classes: Accept changes
1 parent 8099a8c commit b4534fe

File tree

3 files changed

+78
-70
lines changed

3 files changed

+78
-70
lines changed

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

Lines changed: 72 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -103,24 +103,24 @@ classes.kt:
103103
# 25| 3: [TypeAccess] Unit
104104
# 25| 5: [BlockStmt] { ... }
105105
# 28| 9: [Class] ClassSix
106-
# 28| 1: [Constructor] ClassSix
107-
# 28| 5: [BlockStmt] { ... }
108-
# 28| 0: [SuperConstructorInvocationStmt] super(...)
109-
# 28| 1: [BlockStmt] { ... }
110-
# 28| 2: [Method] funIF1
106+
# 28| 1: [Method] funIF1
111107
# 28| 3: [TypeAccess] Unit
112108
# 28| 5: [BlockStmt] { ... }
113109
# 28| 0: [ReturnStmt] return ...
114110
# 28| 0: [MethodCall] funIF1(...)
115111
# 28| -1: [SuperAccess] IF1.super
116112
# 28| 0: [TypeAccess] IF1
117-
# 28| 3: [Method] funIF2
113+
# 28| 2: [Method] funIF2
118114
# 28| 3: [TypeAccess] Unit
119115
# 28| 5: [BlockStmt] { ... }
120116
# 28| 0: [ReturnStmt] return ...
121117
# 28| 0: [MethodCall] funIF2(...)
122118
# 28| -1: [SuperAccess] IF2.super
123119
# 28| 0: [TypeAccess] IF2
120+
# 28| 3: [Constructor] ClassSix
121+
# 28| 5: [BlockStmt] { ... }
122+
# 28| 0: [SuperConstructorInvocationStmt] super(...)
123+
# 28| 1: [BlockStmt] { ... }
124124
# 29| 4: [Constructor] ClassSix
125125
#-----| 4: (Parameters)
126126
# 29| 0: [Parameter] i
@@ -160,26 +160,26 @@ classes.kt:
160160
# 42| -1: [TypeAccess] int
161161
# 42| 0: [IntegerLiteral] 3
162162
# 49| 11: [Class] Direction
163-
# 0| 2: [Method] getEntries
164-
# 0| 3: [TypeAccess] EnumEntries<Direction>
165-
# 0| 0: [TypeAccess] Direction
166-
# 0| 3: [Method] valueOf
167-
# 0| 3: [TypeAccess] Direction
168-
#-----| 4: (Parameters)
169-
# 0| 0: [Parameter] value
170-
# 0| 0: [TypeAccess] String
171-
# 0| 4: [Method] values
172-
# 0| 3: [TypeAccess] Direction[]
173-
# 0| 0: [TypeAccess] Direction
174-
# 49| 5: [Constructor] Direction
163+
# 49| 2: [Constructor] Direction
175164
# 49| 5: [BlockStmt] { ... }
176165
# 49| 0: [ExprStmt] <Expr>;
177-
# 49| 0: [ClassInstanceExpr] new Enum(...)
166+
# 49| 0: [ClassInstanceExpr] new Enum<Direction>(...)
178167
# 49| -3: [TypeAccess] Enum<Direction>
179168
# 49| 0: [TypeAccess] Direction
180169
# 49| 0: [NullLiteral] null
181170
# 49| 1: [IntegerLiteral] 0
182171
# 49| 1: [BlockStmt] { ... }
172+
# 49| 3: [Method] getEntries
173+
# 49| 3: [TypeAccess] EnumEntries<Direction>
174+
# 49| 0: [TypeAccess] Direction
175+
# 49| 4: [Method] valueOf
176+
# 49| 3: [TypeAccess] Direction
177+
#-----| 4: (Parameters)
178+
# 49| 0: [Parameter] value
179+
# 49| 0: [TypeAccess] String
180+
# 49| 5: [Method] values
181+
# 49| 3: [TypeAccess] Direction[]
182+
# 49| 0: [TypeAccess] Direction
183183
# 50| 6: [FieldDeclaration] Direction NORTH;
184184
# 50| -1: [TypeAccess] Direction
185185
# 50| 0: [ClassInstanceExpr] new Direction(...)
@@ -197,24 +197,24 @@ classes.kt:
197197
# 50| 0: [ClassInstanceExpr] new Direction(...)
198198
# 50| -3: [TypeAccess] Direction
199199
# 53| 12: [Class] Color
200-
# 0| 2: [Method] getEntries
201-
# 0| 3: [TypeAccess] EnumEntries<Color>
202-
# 0| 0: [TypeAccess] Color
203-
# 0| 3: [Method] valueOf
204-
# 0| 3: [TypeAccess] Color
200+
# 53| 2: [Method] getEntries
201+
# 53| 3: [TypeAccess] EnumEntries<Color>
202+
# 53| 0: [TypeAccess] Color
203+
# 53| 3: [Method] valueOf
204+
# 53| 3: [TypeAccess] Color
205205
#-----| 4: (Parameters)
206-
# 0| 0: [Parameter] value
207-
# 0| 0: [TypeAccess] String
208-
# 0| 4: [Method] values
209-
# 0| 3: [TypeAccess] Color[]
210-
# 0| 0: [TypeAccess] Color
206+
# 53| 0: [Parameter] value
207+
# 53| 0: [TypeAccess] String
208+
# 53| 4: [Method] values
209+
# 53| 3: [TypeAccess] Color[]
210+
# 53| 0: [TypeAccess] Color
211211
# 53| 5: [Constructor] Color
212212
#-----| 4: (Parameters)
213213
# 53| 0: [Parameter] rgb
214214
# 53| 0: [TypeAccess] int
215215
# 53| 5: [BlockStmt] { ... }
216216
# 53| 0: [ExprStmt] <Expr>;
217-
# 53| 0: [ClassInstanceExpr] new Enum(...)
217+
# 53| 0: [ClassInstanceExpr] new Enum<Color>(...)
218218
# 53| -3: [TypeAccess] Enum<Color>
219219
# 53| 0: [TypeAccess] Color
220220
# 53| 0: [NullLiteral] null
@@ -279,8 +279,8 @@ classes.kt:
279279
# 66| 1: [ExprStmt] <Expr>;
280280
# 66| 0: [ClassInstanceExpr] new (...)
281281
# 66| -3: [TypeAccess] Object
282-
# 65| 1: [WhenBranch] ... -> ...
283-
# 65| 0: [BooleanLiteral] true
282+
# 68| 1: [WhenBranch] ... -> ...
283+
# 68| 0: [BooleanLiteral] true
284284
# 68| 1: [ReturnStmt] return ...
285285
# 68| 0: [StmtExpr] <Stmt>
286286
# 68| 0: [BlockStmt] { ... }
@@ -658,7 +658,14 @@ generic_anonymous.kt:
658658
# 1| 0: [ReturnStmt] return ...
659659
# 1| 0: [VarAccess] this.t
660660
# 1| -1: [ThisAccess] this
661-
# 3| 4: [FieldDeclaration] new Object(...) { ... } x;
661+
# 3| 4: [Method] getX$private
662+
# 3| 3: [TypeAccess] new Object(...) { ... }
663+
# 3| 0: [TypeAccess] T
664+
# 3| 5: [BlockStmt] { ... }
665+
# 3| 0: [ReturnStmt] return ...
666+
# 3| 0: [VarAccess] this.x
667+
# 3| -1: [ThisAccess] this
668+
# 3| 5: [FieldDeclaration] new Object(...) { ... } x;
662669
# 3| -1: [TypeAccess] new Object(...) { ... }
663670
# 3| 0: [TypeAccess] T
664671
# 3| 0: [StmtExpr] <Stmt>
@@ -686,13 +693,6 @@ generic_anonymous.kt:
686693
# 3| 1: [ExprStmt] <Expr>;
687694
# 3| 0: [ClassInstanceExpr] new (...)
688695
# 3| -3: [TypeAccess] Object
689-
# 3| 5: [Method] getX$private
690-
# 3| 3: [TypeAccess] new Object(...) { ... }
691-
# 3| 0: [TypeAccess] T
692-
# 3| 5: [BlockStmt] { ... }
693-
# 3| 0: [ReturnStmt] return ...
694-
# 3| 0: [VarAccess] this.x
695-
# 3| -1: [ThisAccess] this
696696
# 7| 6: [Method] get
697697
# 7| 3: [TypeAccess] T
698698
# 7| 5: [BlockStmt] { ... }
@@ -882,18 +882,22 @@ localClassField.kt:
882882
# 2| 0: [WhenExpr] when ...
883883
# 2| 0: [WhenBranch] ... -> ...
884884
# 2| 0: [BooleanLiteral] true
885-
# 2| 1: [BlockStmt] { ... }
886-
# 3| 0: [LocalTypeDeclStmt] class ...
887-
# 3| 0: [LocalClass] L
888-
# 3| 1: [Constructor] L
889-
# 3| 5: [BlockStmt] { ... }
890-
# 3| 0: [SuperConstructorInvocationStmt] super(...)
891-
# 3| 1: [BlockStmt] { ... }
892-
# 4| 1: [ExprStmt] <Expr>;
893-
# 4| 0: [ClassInstanceExpr] new L(...)
894-
# 4| -3: [TypeAccess] L
895-
# 2| 1: [WhenBranch] ... -> ...
896-
# 2| 0: [BooleanLiteral] true
885+
# 2| 1: [ExprStmt] <Expr>;
886+
# 2| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
887+
# 2| 0: [TypeAccess] Unit
888+
# 2| 1: [StmtExpr] <Stmt>
889+
# 2| 0: [BlockStmt] { ... }
890+
# 3| 0: [LocalTypeDeclStmt] class ...
891+
# 3| 0: [LocalClass] L
892+
# 3| 1: [Constructor] L
893+
# 3| 5: [BlockStmt] { ... }
894+
# 3| 0: [SuperConstructorInvocationStmt] super(...)
895+
# 3| 1: [BlockStmt] { ... }
896+
# 4| 1: [ExprStmt] <Expr>;
897+
# 4| 0: [ClassInstanceExpr] new L(...)
898+
# 4| -3: [TypeAccess] L
899+
# 5| 1: [WhenBranch] ... -> ...
900+
# 5| 0: [BooleanLiteral] true
897901
# 5| 1: [BlockStmt] { ... }
898902
# 2| 3: [Method] getX
899903
# 2| 3: [TypeAccess] Object
@@ -906,18 +910,22 @@ localClassField.kt:
906910
# 7| 0: [WhenExpr] when ...
907911
# 7| 0: [WhenBranch] ... -> ...
908912
# 7| 0: [BooleanLiteral] true
909-
# 7| 1: [BlockStmt] { ... }
910-
# 8| 0: [LocalTypeDeclStmt] class ...
911-
# 8| 0: [LocalClass] L
912-
# 8| 1: [Constructor] L
913-
# 8| 5: [BlockStmt] { ... }
914-
# 8| 0: [SuperConstructorInvocationStmt] super(...)
915-
# 8| 1: [BlockStmt] { ... }
916-
# 9| 1: [ExprStmt] <Expr>;
917-
# 9| 0: [ClassInstanceExpr] new L(...)
918-
# 9| -3: [TypeAccess] L
919-
# 7| 1: [WhenBranch] ... -> ...
920-
# 7| 0: [BooleanLiteral] true
913+
# 7| 1: [ExprStmt] <Expr>;
914+
# 7| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
915+
# 7| 0: [TypeAccess] Unit
916+
# 7| 1: [StmtExpr] <Stmt>
917+
# 7| 0: [BlockStmt] { ... }
918+
# 8| 0: [LocalTypeDeclStmt] class ...
919+
# 8| 0: [LocalClass] L
920+
# 8| 1: [Constructor] L
921+
# 8| 5: [BlockStmt] { ... }
922+
# 8| 0: [SuperConstructorInvocationStmt] super(...)
923+
# 8| 1: [BlockStmt] { ... }
924+
# 9| 1: [ExprStmt] <Expr>;
925+
# 9| 0: [ClassInstanceExpr] new L(...)
926+
# 9| -3: [TypeAccess] L
927+
# 10| 1: [WhenBranch] ... -> ...
928+
# 10| 0: [BooleanLiteral] true
921929
# 10| 1: [BlockStmt] { ... }
922930
# 7| 5: [Method] getY
923931
# 7| 3: [TypeAccess] Object

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ thisCall
22
| classes.kt:29:26:29:31 | this(...) |
33
superCall
44
| classes.kt:2:1:2:18 | super(...) |
5-
| classes.kt:4:1:6:1 | super(...) |
5+
| classes.kt:4:16:4:29 | super(...) |
66
| classes.kt:8:1:10:1 | super(...) |
77
| classes.kt:12:23:12:34 | super(...) |
88
| classes.kt:17:18:17:28 | super(...) |
@@ -41,7 +41,7 @@ superCall
4141
| classes.kt:151:5:155:5 | super(...) |
4242
| classes.kt:159:5:159:14 | super(...) |
4343
| classes.kt:162:13:162:22 | super(...) |
44-
| generic_anonymous.kt:1:1:9:1 | super(...) |
44+
| generic_anonymous.kt:1:25:1:34 | super(...) |
4545
| generic_anonymous.kt:3:19:5:3 | super(...) |
4646
| generic_anonymous.kt:15:1:33:1 | super(...) |
4747
| generic_anonymous.kt:25:9:31:9 | super(...) |

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
| generic_anonymous.kt:1:26:1:33 | this.t | T |
99
| generic_anonymous.kt:3:3:5:3 | ...=... | new Object(...) { ... } |
1010
| generic_anonymous.kt:3:3:5:3 | T | T |
11+
| generic_anonymous.kt:3:3:5:3 | T | T |
12+
| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } |
1113
| generic_anonymous.kt:3:3:5:3 | new Object(...) { ... } | new Object(...) { ... } |
14+
| generic_anonymous.kt:3:3:5:3 | this | Generic |
15+
| generic_anonymous.kt:3:3:5:3 | this.x | new Object(...) { ... } |
1216
| generic_anonymous.kt:3:3:5:3 | x | new Object(...) { ... } |
13-
| generic_anonymous.kt:3:11:5:3 | T | T |
14-
| generic_anonymous.kt:3:11:5:3 | new Object(...) { ... } | new Object(...) { ... } |
15-
| generic_anonymous.kt:3:11:5:3 | this | Generic |
16-
| generic_anonymous.kt:3:11:5:3 | this.x | new Object(...) { ... } |
1717
| generic_anonymous.kt:3:19:5:3 | <Stmt> | new Object(...) { ... } |
1818
| generic_anonymous.kt:3:19:5:3 | Object | Object |
1919
| generic_anonymous.kt:3:19:5:3 | new (...) | new Object(...) { ... } |

0 commit comments

Comments
 (0)