Skip to content

Commit e3a6dda

Browse files
committed
unified: Add regression test for cast on LHS
1 parent b4e903f commit e3a6dda

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎unified/ql/test/library-tests/dataflow/test.swift‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,12 @@ func t28() {
255255
sink(getOptional() ?? "default") // $ hasValueFlow=t28.1
256256
sink("safe" ?? getOptional()) // $ hasValueFlow=t28.1
257257
}
258+
259+
func t29() {
260+
class Box {
261+
var field: String = ""
262+
}
263+
let box = Box()
264+
(box as! Box).field = source("t29.1")
265+
sink(box.field) // $ MISSING: hasValueFlow=t29.1
266+
}

0 commit comments

Comments
 (0)