Assert fails in NullableWalker with (invalid) statement block in assignment
Open
Area-Compilers
Bug
Feature - Nullable Reference Types
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
roslyn version 405a8fa923a7b11fd4645ecdd092fb1123a4865a
```cs
[Fact]
public void Block()
{
var source = """
#nullable enable
string s = {"y"}"x";
""";
CreateCompilation(source).VerifyDiagnostics();
}
```
> System.InvalidOperationException : Analyzed 6 nodes in NullableWalker, but DebugVerifier expects 4. Example of unverified node: BoundLiteral "y"
> Stack Trace:
> src\Compilers\CSharp\Portable\FlowAnalysis\NullableWalker.DebugVerifier.cs(50,0): at Microsoft.CodeAnalysis.CSharp.NullableWalker.DebugVerifier.Verify(ImmutableDictionary`2 analyzedNullabilityMap, SnapshotManager snapshotManagerOpt, BoundNode node)
Contributor guide
Assessment
This issue has not been assessed yet.