C#: Add test exposing missing delegate flow

This commit is contained in:
Tom Hvitved
2021-03-04 13:50:38 +01:00
parent 25adcfc39d
commit 29c6d22163
2 changed files with 13 additions and 1 deletions

View File

@@ -196,7 +196,7 @@
| GlobalDataFlow.cs:472:25:472:50 | call to method ConfigureAwait | return | GlobalDataFlow.cs:472:25:472:50 | call to method ConfigureAwait |
| GlobalDataFlow.cs:473:23:473:44 | call to method GetAwaiter | return | GlobalDataFlow.cs:473:23:473:44 | call to method GetAwaiter |
| GlobalDataFlow.cs:474:22:474:40 | call to method GetResult | return | GlobalDataFlow.cs:474:22:474:40 | call to method GetResult |
| GlobalDataFlow.cs:486:44:486:47 | delegate call | return | GlobalDataFlow.cs:486:44:486:47 | delegate call |
| GlobalDataFlow.cs:498:44:498:47 | delegate call | return | GlobalDataFlow.cs:498:44:498:47 | delegate call |
| Splitting.cs:8:17:8:31 | [b (line 3): false] call to method Return | return | Splitting.cs:8:17:8:31 | [b (line 3): false] call to method Return |
| Splitting.cs:8:17:8:31 | [b (line 3): true] call to method Return | return | Splitting.cs:8:17:8:31 | [b (line 3): true] call to method Return |
| Splitting.cs:20:22:20:30 | call to method Return | return | Splitting.cs:20:22:20:30 | call to method Return |

View File

@@ -474,6 +474,18 @@ public class DataFlow
var sink45 = awaiter.GetResult();
Check(sink45);
}
void M5(bool b)
{
void Inner(Action<string> a, bool b, string arg)
{
if (b)
a = s => Check(s);
a(arg);
}
Inner(_ => {}, b, "taint source");
}
}
static class IEnumerableExtensions