Version Used: commit 812a5c0
Steps to Reproduce:
Execute the following FlowTestBase test (or just query the dataflow)
[Fact]
public void TestDataFlowsArrayInit2()
{
var analysis = CompileAndAnalyzeDataFlowExpression(@"
class C {
public void F(int x)
{
int a = 1, y = 2;
int[] b = new int[] /*<bind>*/{ a + x + 3 } /*</bind>*/;
int c = a + 4 + y;
}
}");
Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn));
}
Expected Behavior:
The test should pass
Actual Behavior:
DataFlow.Success is false because NullableWalker does not Visit the array initializer which causes: "badregion".
Workaround:
We can just analyze the array creation itself - it has no impact on the result.
Version Used: commit 812a5c0
Steps to Reproduce:
Execute the following
FlowTestBasetest (or just query the dataflow)Expected Behavior:
The test should pass
Actual Behavior:
DataFlow.Successis false becauseNullableWalkerdoes not Visit the array initializer which causes: "badregion".Workaround:
We can just analyze the array creation itself - it has no impact on the result.