Skip to content

Commit 2ad121a

Browse files
committed
Swift: Simplify test.
1 parent 2465cc2 commit 2ad121a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

swift/ql/test/library-tests/dataflow/capture/closures.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func baz() -> () -> Int {
9797
return r
9898
}
9999

100-
func sharedCapture() -> Int {
100+
func sharedCapture() {
101101
let (incrX, getX) = {
102102
var x = source("sharedCapture", 0)
103103
return ({ x += 1 }, { x })
@@ -111,8 +111,6 @@ func sharedCapture() -> Int {
111111
sink(getX()) // $ MISSING: hasValueFlow=sharedCapture
112112
doubleIncrX()
113113
sink(getX()) // $ MISSING: hasTaintFlow=sharedCapture
114-
doubleIncrX()
115-
return getX()
116114
}
117115

118116
func sharedCaptureMultipleWriters() {

0 commit comments

Comments
 (0)