mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Swift: Add failing test.
This commit is contained in:
@@ -151,3 +151,10 @@ func simplestTest() {
|
||||
let x = source("simplestTest", 0)
|
||||
sink(x) // $ hasValueFlow=simplestTest
|
||||
}
|
||||
|
||||
func sideEffects() {
|
||||
var x = 0
|
||||
var f = { () in x = source("sideEffects", 1) }
|
||||
f()
|
||||
sink(x) // $ MISSING: hasValueFlow=sideEffects
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user