Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64b9e91 commit fe186bfCopy full SHA for fe186bf
1 file changed
python/ql/test/library-tests/PointsTo/new/code/w_function_values.py
@@ -0,0 +1,32 @@
1
+def test_conditoinal_function(cond):
2
+ def foo():
3
+ return "foo"
4
+
5
+ def bar():
6
+ return "bar"
7
8
+ if cond:
9
+ f = foo
10
+ else:
11
+ f = bar
12
13
+ sink = f()
14
+ return sink
15
16
17
+f_false = test_conditoinal_function(False)
18
+f_true = test_conditoinal_function(True)
19
20
21
+def foo():
22
23
24
25
+def test_redefinition():
26
27
28
29
+ return "refined"
30
31
32
0 commit comments