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

Commit dd9738f

Browse files
author
Max Schaefer
committed
Better fix for frontend errors in DeadStoreOfLocal tests.
1 parent 013d88e commit dd9738f

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

ql/test/query-tests/RedundantCode/DeadStoreOfLocal/DeadStoreOfLocal.expected

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
| testdata.go:268:2:268:2 | assignment to x | This definition of x is never used. |
2121
| testdata.go:309:2:309:2 | assignment to a | This definition of a is never used. |
2222
| testdata.go:321:2:321:2 | assignment to a | This definition of a is never used. |
23-
| testdata.go:431:3:431:3 | assignment to x | This definition of x is never used. |
24-
| testdata.go:433:3:433:3 | assignment to x | This definition of x is never used. |
25-
| testdata.go:440:2:440:2 | assignment to x | This definition of x is never used. |
26-
| testdata.go:487:3:487:3 | assignment to x | This definition of x is never used. |
27-
| testdata.go:541:3:541:3 | assignment to x | This definition of x is never used. |
28-
| testdata.go:579:4:579:4 | assignment to x | This definition of x is never used. |
23+
| testdata.go:387:3:387:3 | assignment to x | This definition of x is never used. |
24+
| testdata.go:432:3:432:3 | assignment to x | This definition of x is never used. |
25+
| testdata.go:434:3:434:3 | assignment to x | This definition of x is never used. |
26+
| testdata.go:441:2:441:2 | assignment to x | This definition of x is never used. |
27+
| testdata.go:488:3:488:3 | assignment to x | This definition of x is never used. |
28+
| testdata.go:542:3:542:3 | assignment to x | This definition of x is never used. |
29+
| testdata.go:580:4:580:4 | assignment to x | This definition of x is never used. |

ql/test/query-tests/RedundantCode/DeadStoreOfLocal/testdata.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,12 @@ func _() {
381381
func _() {
382382
var x int
383383
switch b {
384+
case true:
385+
_ = x
384386
default:
385387
x = deadStore() // BAD
386388
fallthrough
387389
case b:
388-
_ = x
389390
}
390391
}
391392

0 commit comments

Comments
 (0)