Skip to content

Commit bac28b9

Browse files
committed
C#: Add test that shows unintended flow summary generation
1 parent 2e7da72 commit bac28b9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
unexpectedModel
2+
| Unexpected contentbased-summary found: Models;HigherOrderParameters;false;Apply;(System.Func<System.Object,System.Object>,System.Object);;Argument[1];ReturnValue;value;dfc-generated |
23
expectedModel

csharp/ql/test/utils/modelgenerator/dataflow/Summaries.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,12 @@ public void Apply(Action<object> a, object o)
536536
{
537537
a(o);
538538
}
539+
540+
private void CallApply()
541+
{
542+
// Test that this call to `Apply` does not interfere with the flow summaries generated for `Apply`
543+
Apply(x => x, null);
544+
}
539545
}
540546

541547
public static class HigherOrderExtensionMethods

0 commit comments

Comments
 (0)