Skip to content

Commit 8ec681e

Browse files
committed
Kotlin: bump default CI version to 1.7.20
A bunch of test expectations change because JetBrains/kotlin@7f531d8 means that we now see (a) local variable declarations with source locations covering only their identifier, not the whole statement, and (b) more SYNTHETIC_OFFSET values for the parts of a destructuring assignment or initialiser, which show up as file.kt:0:0:0:0 in DbLocation form.
1 parent 3c7f751 commit 8ec681e

17 files changed

+478
-478
lines changed

java/kotlin-extractor/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
kotlin.code.style=official
2-
kotlinVersion=1.7.0
2+
kotlinVersion=1.7.21
33

44
GROUP=com.github.codeql
55
VERSION_NAME=0.0.1

java/kotlin-extractor/kotlin_plugin_versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def version_string_to_tuple(version):
2222
return tuple([int(m.group(i)) for i in range(1, 4)] + [m.group(4)])
2323

2424
# Version number used by CI. It needs to be one of the versions in many_versions.
25-
ci_version = '1.7.0'
25+
ci_version = '1.7.20'
2626

2727
# Version numbers in the list need to be in semantically increasing order
28-
many_versions = [ '1.4.32', '1.5.0', '1.5.10', '1.5.20', '1.5.30', '1.6.0', '1.6.20', '1.7.0', '1.7.20-Beta' ]
28+
many_versions = [ '1.4.32', '1.5.0', '1.5.10', '1.5.20', '1.5.30', '1.6.0', '1.6.20', '1.7.0', '1.7.20' ]
2929

3030
many_versions_tuples = [version_string_to_tuple(v) for v in many_versions]
3131

java/ql/test/kotlin/library-tests/controlflow/basic/bbStmts.expected

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
| Test.kt:3:1:80:1 | { ... } | 3 | Test.kt:3:8:80:1 | Test |
55
| Test.kt:4:2:79:2 | test | 0 | Test.kt:4:2:79:2 | test |
66
| Test.kt:4:13:79:2 | { ... } | 0 | Test.kt:4:13:79:2 | { ... } |
7-
| Test.kt:4:13:79:2 | { ... } | 1 | Test.kt:5:3:5:16 | var ...; |
7+
| Test.kt:4:13:79:2 | { ... } | 1 | Test.kt:5:7:5:7 | var ...; |
88
| Test.kt:4:13:79:2 | { ... } | 2 | Test.kt:5:16:5:16 | 0 |
9-
| Test.kt:4:13:79:2 | { ... } | 3 | Test.kt:5:3:5:16 | x |
10-
| Test.kt:4:13:79:2 | { ... } | 4 | Test.kt:6:3:6:18 | var ...; |
9+
| Test.kt:4:13:79:2 | { ... } | 3 | Test.kt:5:7:5:7 | x |
10+
| Test.kt:4:13:79:2 | { ... } | 4 | Test.kt:6:7:6:7 | var ...; |
1111
| Test.kt:4:13:79:2 | { ... } | 5 | Test.kt:6:17:6:18 | 50 |
12-
| Test.kt:4:13:79:2 | { ... } | 6 | Test.kt:6:3:6:18 | y |
13-
| Test.kt:4:13:79:2 | { ... } | 7 | Test.kt:7:3:7:16 | var ...; |
12+
| Test.kt:4:13:79:2 | { ... } | 6 | Test.kt:6:7:6:7 | y |
13+
| Test.kt:4:13:79:2 | { ... } | 7 | Test.kt:7:7:7:7 | var ...; |
1414
| Test.kt:4:13:79:2 | { ... } | 8 | Test.kt:7:16:7:16 | 0 |
15-
| Test.kt:4:13:79:2 | { ... } | 9 | Test.kt:7:3:7:16 | z |
16-
| Test.kt:4:13:79:2 | { ... } | 10 | Test.kt:8:3:8:16 | var ...; |
15+
| Test.kt:4:13:79:2 | { ... } | 9 | Test.kt:7:7:7:7 | z |
16+
| Test.kt:4:13:79:2 | { ... } | 10 | Test.kt:8:7:8:7 | var ...; |
1717
| Test.kt:4:13:79:2 | { ... } | 11 | Test.kt:8:16:8:16 | 0 |
18-
| Test.kt:4:13:79:2 | { ... } | 12 | Test.kt:8:3:8:16 | w |
18+
| Test.kt:4:13:79:2 | { ... } | 12 | Test.kt:8:7:8:7 | w |
1919
| Test.kt:4:13:79:2 | { ... } | 13 | Test.kt:11:3:16:3 | <Expr>; |
2020
| Test.kt:4:13:79:2 | { ... } | 14 | Test.kt:11:3:16:3 | when ... |
2121
| Test.kt:4:13:79:2 | { ... } | 15 | Test.kt:11:3:16:3 | ... -> ... |
@@ -106,12 +106,12 @@
106106
| Test.kt:82:21:89:1 | { ... } | 0 | Test.kt:82:21:89:1 | { ... } |
107107
| Test.kt:82:21:89:1 | { ... } | 1 | Test.kt:83:2:88:2 | try ... |
108108
| Test.kt:82:21:89:1 | { ... } | 2 | Test.kt:83:6:86:2 | { ... } |
109-
| Test.kt:82:21:89:1 | { ... } | 3 | Test.kt:84:3:84:18 | var ...; |
109+
| Test.kt:82:21:89:1 | { ... } | 3 | Test.kt:84:7:84:7 | var ...; |
110110
| Test.kt:82:21:89:1 | { ... } | 4 | Test.kt:84:11:84:11 | o |
111111
| Test.kt:82:21:89:1 | { ... } | 5 | Test.kt:84:11:84:18 | (...)... |
112-
| Test.kt:84:3:84:18 | x | 0 | Test.kt:84:3:84:18 | x |
113-
| Test.kt:84:3:84:18 | x | 1 | Test.kt:85:10:85:10 | 1 |
114-
| Test.kt:84:3:84:18 | x | 2 | Test.kt:85:3:85:10 | return ... |
112+
| Test.kt:84:7:84:7 | x | 0 | Test.kt:84:7:84:7 | x |
113+
| Test.kt:84:7:84:7 | x | 1 | Test.kt:85:10:85:10 | 1 |
114+
| Test.kt:84:7:84:7 | x | 2 | Test.kt:85:3:85:10 | return ... |
115115
| Test.kt:86:4:88:2 | catch (...) | 0 | Test.kt:86:4:88:2 | catch (...) |
116116
| Test.kt:86:4:88:2 | catch (...) | 1 | Test.kt:86:11:86:31 | e |
117117
| Test.kt:86:4:88:2 | catch (...) | 2 | Test.kt:86:34:88:2 | { ... } |
@@ -121,12 +121,12 @@
121121
| Test.kt:91:22:98:1 | { ... } | 0 | Test.kt:91:22:98:1 | { ... } |
122122
| Test.kt:91:22:98:1 | { ... } | 1 | Test.kt:92:2:97:2 | try ... |
123123
| Test.kt:91:22:98:1 | { ... } | 2 | Test.kt:92:6:95:2 | { ... } |
124-
| Test.kt:91:22:98:1 | { ... } | 3 | Test.kt:93:3:93:13 | var ...; |
124+
| Test.kt:91:22:98:1 | { ... } | 3 | Test.kt:93:7:93:7 | var ...; |
125125
| Test.kt:91:22:98:1 | { ... } | 4 | Test.kt:93:11:93:11 | o |
126126
| Test.kt:91:22:98:1 | { ... } | 5 | Test.kt:93:12:93:13 | ...!! |
127-
| Test.kt:93:3:93:13 | x | 0 | Test.kt:93:3:93:13 | x |
128-
| Test.kt:93:3:93:13 | x | 1 | Test.kt:94:10:94:10 | 1 |
129-
| Test.kt:93:3:93:13 | x | 2 | Test.kt:94:3:94:10 | return ... |
127+
| Test.kt:93:7:93:7 | x | 0 | Test.kt:93:7:93:7 | x |
128+
| Test.kt:93:7:93:7 | x | 1 | Test.kt:94:10:94:10 | 1 |
129+
| Test.kt:93:7:93:7 | x | 2 | Test.kt:94:3:94:10 | return ... |
130130
| Test.kt:95:4:97:2 | catch (...) | 0 | Test.kt:95:4:97:2 | catch (...) |
131131
| Test.kt:95:4:97:2 | catch (...) | 1 | Test.kt:95:11:95:33 | e |
132132
| Test.kt:95:4:97:2 | catch (...) | 2 | Test.kt:95:36:97:2 | { ... } |

java/ql/test/kotlin/library-tests/controlflow/basic/bbStrictDominance.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
| Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } |
2929
| Test.kt:38:9:38:9 | x | Test.kt:43:3:43:3 | <Expr>; |
3030
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | t1 |
31-
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
31+
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:7:84:7 | x |
3232
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
3333
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | t2 |
34-
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
34+
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:7:93:7 | x |
3535
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
3636
| Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | fn |
3737
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y |

java/ql/test/kotlin/library-tests/controlflow/basic/bbSuccessor.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
| Test.kt:38:9:38:9 | x | Test.kt:43:3:43:3 | <Expr>; |
1414
| Test.kt:38:16:41:3 | { ... } | Test.kt:38:9:38:9 | x |
1515
| Test.kt:43:3:43:3 | <Expr>; | Test.kt:4:2:79:2 | test |
16-
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
16+
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:7:84:7 | x |
1717
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
18-
| Test.kt:84:3:84:18 | x | Test.kt:82:1:89:1 | t1 |
18+
| Test.kt:84:7:84:7 | x | Test.kt:82:1:89:1 | t1 |
1919
| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | t1 |
20-
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
20+
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:7:93:7 | x |
2121
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
22-
| Test.kt:93:3:93:13 | x | Test.kt:91:1:98:1 | t2 |
22+
| Test.kt:93:7:93:7 | x | Test.kt:91:1:98:1 | t2 |
2323
| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | t2 |
2424
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y |
2525
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | <Expr>; |

java/ql/test/kotlin/library-tests/controlflow/basic/getASuccessor.expected

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ missingSuccessor
88
| Test.kt:3:8:80:1 | { ... } | BlockStmt | Test.kt:3:8:80:1 | Test | Constructor |
99
| Test.kt:4:2:79:2 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
1010
| Test.kt:4:2:79:2 | test | Method | file://:0:0:0:0 | <none> | <none> |
11-
| Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt |
12-
| Test.kt:5:3:5:16 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
13-
| Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt | Test.kt:5:16:5:16 | 0 | IntegerLiteral |
14-
| Test.kt:5:3:5:16 | x | LocalVariableDeclExpr | Test.kt:6:3:6:18 | var ...; | LocalVariableDeclStmt |
15-
| Test.kt:5:16:5:16 | 0 | IntegerLiteral | Test.kt:5:3:5:16 | x | LocalVariableDeclExpr |
16-
| Test.kt:6:3:6:18 | long y | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
17-
| Test.kt:6:3:6:18 | var ...; | LocalVariableDeclStmt | Test.kt:6:17:6:18 | 50 | LongLiteral |
18-
| Test.kt:6:3:6:18 | y | LocalVariableDeclExpr | Test.kt:7:3:7:16 | var ...; | LocalVariableDeclStmt |
19-
| Test.kt:6:17:6:18 | 50 | LongLiteral | Test.kt:6:3:6:18 | y | LocalVariableDeclExpr |
20-
| Test.kt:7:3:7:16 | int z | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
21-
| Test.kt:7:3:7:16 | var ...; | LocalVariableDeclStmt | Test.kt:7:16:7:16 | 0 | IntegerLiteral |
22-
| Test.kt:7:3:7:16 | z | LocalVariableDeclExpr | Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt |
23-
| Test.kt:7:16:7:16 | 0 | IntegerLiteral | Test.kt:7:3:7:16 | z | LocalVariableDeclExpr |
24-
| Test.kt:8:3:8:16 | int w | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
25-
| Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt | Test.kt:8:16:8:16 | 0 | IntegerLiteral |
26-
| Test.kt:8:3:8:16 | w | LocalVariableDeclExpr | Test.kt:11:3:16:3 | <Expr>; | ExprStmt |
27-
| Test.kt:8:16:8:16 | 0 | IntegerLiteral | Test.kt:8:3:8:16 | w | LocalVariableDeclExpr |
11+
| Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:7:5:7 | var ...; | LocalVariableDeclStmt |
12+
| Test.kt:5:7:5:7 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
13+
| Test.kt:5:7:5:7 | var ...; | LocalVariableDeclStmt | Test.kt:5:16:5:16 | 0 | IntegerLiteral |
14+
| Test.kt:5:7:5:7 | x | LocalVariableDeclExpr | Test.kt:6:7:6:7 | var ...; | LocalVariableDeclStmt |
15+
| Test.kt:5:16:5:16 | 0 | IntegerLiteral | Test.kt:5:7:5:7 | x | LocalVariableDeclExpr |
16+
| Test.kt:6:7:6:7 | long y | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
17+
| Test.kt:6:7:6:7 | var ...; | LocalVariableDeclStmt | Test.kt:6:17:6:18 | 50 | LongLiteral |
18+
| Test.kt:6:7:6:7 | y | LocalVariableDeclExpr | Test.kt:7:7:7:7 | var ...; | LocalVariableDeclStmt |
19+
| Test.kt:6:17:6:18 | 50 | LongLiteral | Test.kt:6:7:6:7 | y | LocalVariableDeclExpr |
20+
| Test.kt:7:7:7:7 | int z | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
21+
| Test.kt:7:7:7:7 | var ...; | LocalVariableDeclStmt | Test.kt:7:16:7:16 | 0 | IntegerLiteral |
22+
| Test.kt:7:7:7:7 | z | LocalVariableDeclExpr | Test.kt:8:7:8:7 | var ...; | LocalVariableDeclStmt |
23+
| Test.kt:7:16:7:16 | 0 | IntegerLiteral | Test.kt:7:7:7:7 | z | LocalVariableDeclExpr |
24+
| Test.kt:8:7:8:7 | int w | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
25+
| Test.kt:8:7:8:7 | var ...; | LocalVariableDeclStmt | Test.kt:8:16:8:16 | 0 | IntegerLiteral |
26+
| Test.kt:8:7:8:7 | w | LocalVariableDeclExpr | Test.kt:11:3:16:3 | <Expr>; | ExprStmt |
27+
| Test.kt:8:16:8:16 | 0 | IntegerLiteral | Test.kt:8:7:8:7 | w | LocalVariableDeclExpr |
2828
| Test.kt:11:3:16:3 | ... -> ... | WhenBranch | Test.kt:11:3:16:3 | true | BooleanLiteral |
2929
| Test.kt:11:3:16:3 | ... -> ... | WhenBranch | Test.kt:11:7:11:7 | x | VarAccess |
3030
| Test.kt:11:3:16:3 | <Expr>; | ExprStmt | Test.kt:11:3:16:3 | when ... | WhenExpr |
@@ -137,12 +137,12 @@ missingSuccessor
137137
| Test.kt:82:8:82:13 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
138138
| Test.kt:82:21:89:1 | { ... } | BlockStmt | Test.kt:83:2:88:2 | try ... | TryStmt |
139139
| Test.kt:83:2:88:2 | try ... | TryStmt | Test.kt:83:6:86:2 | { ... } | BlockStmt |
140-
| Test.kt:83:6:86:2 | { ... } | BlockStmt | Test.kt:84:3:84:18 | var ...; | LocalVariableDeclStmt |
141-
| Test.kt:84:3:84:18 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
142-
| Test.kt:84:3:84:18 | var ...; | LocalVariableDeclStmt | Test.kt:84:11:84:11 | o | VarAccess |
143-
| Test.kt:84:3:84:18 | x | LocalVariableDeclExpr | Test.kt:85:10:85:10 | 1 | IntegerLiteral |
140+
| Test.kt:83:6:86:2 | { ... } | BlockStmt | Test.kt:84:7:84:7 | var ...; | LocalVariableDeclStmt |
141+
| Test.kt:84:7:84:7 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
142+
| Test.kt:84:7:84:7 | var ...; | LocalVariableDeclStmt | Test.kt:84:11:84:11 | o | VarAccess |
143+
| Test.kt:84:7:84:7 | x | LocalVariableDeclExpr | Test.kt:85:10:85:10 | 1 | IntegerLiteral |
144144
| Test.kt:84:11:84:11 | o | VarAccess | Test.kt:84:11:84:18 | (...)... | CastExpr |
145-
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:84:3:84:18 | x | LocalVariableDeclExpr |
145+
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:84:7:84:7 | x | LocalVariableDeclExpr |
146146
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:86:4:88:2 | catch (...) | CatchClause |
147147
| Test.kt:84:11:84:18 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
148148
| Test.kt:85:3:85:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | t1 | Method |
@@ -160,12 +160,12 @@ missingSuccessor
160160
| Test.kt:91:8:91:14 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
161161
| Test.kt:91:22:98:1 | { ... } | BlockStmt | Test.kt:92:2:97:2 | try ... | TryStmt |
162162
| Test.kt:92:2:97:2 | try ... | TryStmt | Test.kt:92:6:95:2 | { ... } | BlockStmt |
163-
| Test.kt:92:6:95:2 | { ... } | BlockStmt | Test.kt:93:3:93:13 | var ...; | LocalVariableDeclStmt |
164-
| Test.kt:93:3:93:13 | Object x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
165-
| Test.kt:93:3:93:13 | var ...; | LocalVariableDeclStmt | Test.kt:93:11:93:11 | o | VarAccess |
166-
| Test.kt:93:3:93:13 | x | LocalVariableDeclExpr | Test.kt:94:10:94:10 | 1 | IntegerLiteral |
163+
| Test.kt:92:6:95:2 | { ... } | BlockStmt | Test.kt:93:7:93:7 | var ...; | LocalVariableDeclStmt |
164+
| Test.kt:93:7:93:7 | Object x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
165+
| Test.kt:93:7:93:7 | var ...; | LocalVariableDeclStmt | Test.kt:93:11:93:11 | o | VarAccess |
166+
| Test.kt:93:7:93:7 | x | LocalVariableDeclExpr | Test.kt:94:10:94:10 | 1 | IntegerLiteral |
167167
| Test.kt:93:11:93:11 | o | VarAccess | Test.kt:93:12:93:13 | ...!! | NotNullExpr |
168-
| Test.kt:93:12:93:13 | ...!! | NotNullExpr | Test.kt:93:3:93:13 | x | LocalVariableDeclExpr |
168+
| Test.kt:93:12:93:13 | ...!! | NotNullExpr | Test.kt:93:7:93:7 | x | LocalVariableDeclExpr |
169169
| Test.kt:93:12:93:13 | ...!! | NotNullExpr | Test.kt:95:4:97:2 | catch (...) | CatchClause |
170170
| Test.kt:94:3:94:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | t2 | Method |
171171
| Test.kt:94:10:94:10 | 1 | IntegerLiteral | Test.kt:94:3:94:10 | return ... | ReturnStmt |

0 commit comments

Comments
 (0)