Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit a0a8a58

Browse files
author
Max Schaefer
committed
Fix error in ellipsis.go.
1 parent 5dc8228 commit a0a8a58

File tree

7 files changed

+45
-36
lines changed

7 files changed

+45
-36
lines changed

ql/test/library-tests/semmle/go/Expr/BasicLit_getText.expected

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
| consts.go:46:16:46:16 | 2 | 2 |
2727
| consts.go:47:16:47:18 | 1.0 | 1.0 |
2828
| consts.go:48:16:48:19 | "hi" | "hi" |
29-
| ellipsis.go:7:4:7:4 | 1 | 1 |
30-
| ellipsis.go:8:4:8:4 | 1 | 1 |
31-
| ellipsis.go:8:7:8:7 | 2 | 2 |
32-
| ellipsis.go:9:4:9:4 | 1 | 1 |
33-
| ellipsis.go:9:7:9:7 | 2 | 2 |
34-
| ellipsis.go:9:10:9:10 | 3 | 3 |
35-
| ellipsis.go:10:4:10:4 | 1 | 1 |
36-
| ellipsis.go:10:13:10:13 | 2 | 2 |
37-
| ellipsis.go:10:16:10:16 | 3 | 3 |
29+
| ellipsis.go:7:5:7:5 | 1 | 1 |
30+
| ellipsis.go:8:5:8:5 | 1 | 1 |
31+
| ellipsis.go:8:8:8:8 | 2 | 2 |
32+
| ellipsis.go:9:5:9:5 | 1 | 1 |
33+
| ellipsis.go:9:8:9:8 | 2 | 2 |
34+
| ellipsis.go:9:11:9:11 | 3 | 3 |
35+
| ellipsis.go:10:5:10:5 | 1 | 1 |
36+
| ellipsis.go:10:14:10:14 | 2 | 2 |
37+
| ellipsis.go:10:17:10:17 | 3 | 3 |
3838
| literals.go:3:8:3:12 | "fmt" | "fmt" |
3939
| literals.go:8:2:8:10 | "decimal" | "decimal" |
4040
| literals.go:8:17:8:18 | 42 | 42 |

ql/test/library-tests/semmle/go/Expr/BasicLit_getValue.expected

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
| consts.go:46:16:46:16 | 2 | 2 |
2727
| consts.go:47:16:47:18 | 1.0 | 1.0 |
2828
| consts.go:48:16:48:19 | "hi" | hi |
29-
| ellipsis.go:7:4:7:4 | 1 | 1 |
30-
| ellipsis.go:8:4:8:4 | 1 | 1 |
31-
| ellipsis.go:8:7:8:7 | 2 | 2 |
32-
| ellipsis.go:9:4:9:4 | 1 | 1 |
33-
| ellipsis.go:9:7:9:7 | 2 | 2 |
34-
| ellipsis.go:9:10:9:10 | 3 | 3 |
35-
| ellipsis.go:10:4:10:4 | 1 | 1 |
36-
| ellipsis.go:10:13:10:13 | 2 | 2 |
37-
| ellipsis.go:10:16:10:16 | 3 | 3 |
29+
| ellipsis.go:7:5:7:5 | 1 | 1 |
30+
| ellipsis.go:8:5:8:5 | 1 | 1 |
31+
| ellipsis.go:8:8:8:8 | 2 | 2 |
32+
| ellipsis.go:9:5:9:5 | 1 | 1 |
33+
| ellipsis.go:9:8:9:8 | 2 | 2 |
34+
| ellipsis.go:9:11:9:11 | 3 | 3 |
35+
| ellipsis.go:10:5:10:5 | 1 | 1 |
36+
| ellipsis.go:10:14:10:14 | 2 | 2 |
37+
| ellipsis.go:10:17:10:17 | 3 | 3 |
3838
| literals.go:3:8:3:12 | "fmt" | fmt |
3939
| literals.go:8:2:8:10 | "decimal" | decimal |
4040
| literals.go:8:17:8:18 | 42 | 42 |

ql/test/library-tests/semmle/go/Expr/CompositeLit.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| ellipsis.go:10:7:10:17 | composite literal | 0 | value | ellipsis.go:10:13:10:13 | 2 |
2-
| ellipsis.go:10:7:10:17 | composite literal | 1 | value | ellipsis.go:10:16:10:16 | 3 |
1+
| ellipsis.go:10:8:10:18 | slice literal | 0 | value | ellipsis.go:10:14:10:14 | 2 |
2+
| ellipsis.go:10:8:10:18 | slice literal | 1 | value | ellipsis.go:10:17:10:17 | 3 |
33
| literals.go:7:15:11:1 | map literal | 0 | key | literals.go:8:2:8:10 | "decimal" |
44
| literals.go:7:15:11:1 | map literal | 0 | value | literals.go:8:17:8:18 | 42 |
55
| literals.go:7:15:11:1 | map literal | 1 | key | literals.go:9:2:9:8 | "octal" |

ql/test/library-tests/semmle/go/Expr/ConstantValues.expected

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@
3131
| consts.go:34:20:34:20 | k | k | 2, 2 |
3232
| consts.go:34:23:34:23 | l | l | 1, 1 |
3333
| consts.go:34:26:34:26 | m | m | hi |
34+
| ellipsis.go:7:5:7:5 | 1 | 1 | 1, 1 |
35+
| ellipsis.go:8:5:8:5 | 1 | 1 | 1, 1 |
36+
| ellipsis.go:8:8:8:8 | 2 | 2 | 2, 2 |
37+
| ellipsis.go:9:5:9:5 | 1 | 1 | 1, 1 |
38+
| ellipsis.go:9:8:9:8 | 2 | 2 | 2, 2 |
39+
| ellipsis.go:9:11:9:11 | 3 | 3 | 3, 3 |
40+
| ellipsis.go:10:5:10:5 | 1 | 1 | 1, 1 |
41+
| ellipsis.go:10:14:10:14 | 2 | 2 | 2, 2 |
42+
| ellipsis.go:10:17:10:17 | 3 | 3 | 3, 3 |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| ellipsis.go:10:2:10:21 | call to f |
1+
| ellipsis.go:10:2:10:22 | call to fn |

ql/test/library-tests/semmle/go/Expr/Ident.expected

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@
5959
| consts.go:48:2:48:2 | m |
6060
| consts.go:48:4:48:11 | mystring |
6161
| ellipsis.go:1:9:1:12 | main |
62-
| ellipsis.go:3:6:3:6 | f |
63-
| ellipsis.go:3:8:3:8 | x |
64-
| ellipsis.go:3:10:3:12 | int |
65-
| ellipsis.go:3:15:3:16 | ys |
66-
| ellipsis.go:3:21:3:23 | int |
62+
| ellipsis.go:3:6:3:7 | fn |
63+
| ellipsis.go:3:9:3:9 | x |
64+
| ellipsis.go:3:11:3:13 | int |
65+
| ellipsis.go:3:16:3:17 | ys |
66+
| ellipsis.go:3:22:3:24 | int |
6767
| ellipsis.go:6:6:6:17 | ellipsisTest |
68-
| ellipsis.go:7:2:7:2 | f |
69-
| ellipsis.go:8:2:8:2 | f |
70-
| ellipsis.go:9:2:9:2 | f |
71-
| ellipsis.go:10:2:10:2 | f |
72-
| ellipsis.go:10:9:10:11 | int |
68+
| ellipsis.go:7:2:7:3 | fn |
69+
| ellipsis.go:8:2:8:3 | fn |
70+
| ellipsis.go:9:2:9:3 | fn |
71+
| ellipsis.go:10:2:10:3 | fn |
72+
| ellipsis.go:10:10:10:12 | int |
7373
| literals.go:1:9:1:12 | main |
7474
| literals.go:7:5:7:11 | intlits |
7575
| literals.go:7:19:7:24 | string |
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package main
22

3-
func f(x int, ys ...int) {
3+
func fn(x int, ys ...int) {
44
}
55

66
func ellipsisTest() {
7-
f(1)
8-
f(1, 2)
9-
f(1, 2, 3)
10-
f(1, []int{2, 3}...)
7+
fn(1)
8+
fn(1, 2)
9+
fn(1, 2, 3)
10+
fn(1, []int{2, 3}...)
1111
}

0 commit comments

Comments
 (0)