We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bcfb7 commit 4a89a30Copy full SHA for 4a89a30
swift/ql/test/library-tests/dataflow/dataflow/test.swift
@@ -457,3 +457,20 @@ func testOptionals2(y: Int?) {
457
sink(arg: y) // (taint but not data flow)
458
}
459
460
+
461
+class C {
462
+ var x: Int?
463
+}
464
465
+func testOptionalPropertyAccess(y: Int?) {
466
+ let x = optionalSource()
467
+ let cx = C()
468
+ cx.x = x
469
+ let cy = C()
470
+ cy.x = y
471
472
+ guard let z1 = cx.x else { return }
473
+ sink(arg: z1) // $ flow=259
474
+ guard let z2 = cy.x else { return }
475
+ sink(arg: z2)
476
0 commit comments