We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06b1d8e commit d22ef44Copy full SHA for d22ef44
1 file changed
csharp/ql/test/library-tests/dataflow/fields/L.cs
@@ -0,0 +1,31 @@
1
+using System;
2
+
3
+public class L
4
+{
5
+ public string f1 { get; set; }
6
+ public string f2 { get; set; }
7
+ public string f3 { get; set; }
8
9
+ private void M1()
10
+ {
11
+ // dynamic write followed by dynamic read
12
+ dynamic d1 = this;
13
+ d1.f1 = Source<string>(1);
14
+ Sink(d1.f1); // $ MISSING: hasValueFlow=1
15
16
+ // dynamic write followed by static read
17
+ dynamic d2 = this;
18
+ d2.f2 = Source<string>(2);
19
+ L l2 = d2;
20
+ Sink(l2.f2); // $ MISSING: hasValueFlow=2
21
22
+ // static write followed by dynamic read
23
+ this.f3 = Source<string>(3);
24
+ dynamic d3 = this;
25
+ Sink(d3.f3); // $ MISSING: hasValueFlow=3
26
+ }
27
28
+ public static void Sink(object o) { }
29
30
+ static T Source<T>(object source) => throw null;
31
+}
0 commit comments