Skip to content

Commit bee372a

Browse files
committed
Unified: Add flow test using super
1 parent e77e8b7 commit bee372a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,21 @@ func t12() {
159159
let c = C()
160160
c.s.update()
161161
}
162+
163+
func t13() {
164+
class C1 {
165+
var x: String = "safe"
166+
}
167+
class C2: C1 {
168+
func updateX(newValue: String) {
169+
super.x = newValue
170+
}
171+
172+
func getX() -> String {
173+
return super.x
174+
}
175+
}
176+
var c2 = C2()
177+
c2.updateX(newValue: source("t13.1"))
178+
sink(c2.getX()) // $ MISSING: hasValueFlow=t13.1
179+
}

0 commit comments

Comments
 (0)