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 191962f commit 91152d3Copy full SHA for 91152d3
1 file changed
csharp/ql/test/library-tests/dataflow/delegates/DelegateFlow.cs
@@ -4,11 +4,11 @@ class DelegateFlow
4
{
5
void M1(int i) { }
6
7
- void M2(Action<int> a)
+ static void M2(Action<int> a)
8
9
a(0);
10
a = _ => { };
11
- a(0);
+ a(1);
12
}
13
14
void M3()
@@ -108,4 +108,20 @@ public void M15()
108
109
110
public delegate void MyDelegate();
111
+
112
+ public unsafe void M16(delegate*<Action<int>, void> fnptr, Action<int> a)
113
+ {
114
+ fnptr(a);
115
+ }
116
117
+ public unsafe void M17()
118
119
+ M16(&M2, (i) => {}); // MISSING: a(0) in M2 is calling this lambda
120
121
122
+ public unsafe void M18()
123
124
+ delegate*<Action<int>, void> fnptr = &M2;
125
+ fnptr((i) => {}); // MISSING: a(0) in M2 is calling this lambda
126
127
0 commit comments