Skip to content

Commit 65e13aa

Browse files
committed
Swift: Add simple version of the 'captureList' test that works.
1 parent 93234c0 commit 65e13aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ func captureList() {
1515
}()
1616
}
1717

18+
func withoutCaptureList() {
19+
let y: Int = source("withoutCaptureList", 124);
20+
{ [] () in
21+
sink(y) // $ hasValueFlow=withoutCaptureList
22+
}()
23+
}
24+
1825
func setAndCallEscape() {
1926
let x = source("setAndCallEscape", 0)
2027

0 commit comments

Comments
 (0)