dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.97k stars 4.03k forks source link

Nullability.FlowState returned for a test expression of a switch statement differs DEBUG vs. RELEASE #40352

Open AlekseyTs opened 4 years ago

AlekseyTs commented 4 years ago

The following tests have FlowState MaybeNull for DEBUG and None for RELEASE.

Microsoft.CodeAnalysis.CSharp.UnitTests.SemanticModelGetSemanticInfoTests.SwitchExpression_Constant02 [FAIL]
  Assert.Equal() Failure
  Expected: MaybeNull
  Actual:   None

Microsoft.CodeAnalysis.CSharp.UnitTests.SemanticModelGetSemanticInfoTests.SwitchExpression_NotConstant [FAIL]
  Assert.Equal() Failure
  Expected: MaybeNull
  Actual:   None
AlekseyTs commented 4 years ago

This is blocking https://github.com/dotnet/roslyn/pull/40338, I am going to disable the unit-tests in RELEASE.

AlekseyTs commented 4 years ago

@cston, @333fred FYI