Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert fails in NullableWalker with (invalid) statement block in assignment #75412

Open
jjonescz opened this issue Oct 7, 2024 · 0 comments
Open
Labels
Area-Compilers Bug New Language Feature - Nullable Reference Types Nullable Reference Types untriaged Issues and PRs which have not yet been triaged by a lead
Milestone

Comments

@jjonescz
Copy link
Member

jjonescz commented Oct 7, 2024

roslyn version 405a8fa

[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)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 7, 2024
@jaredpar jaredpar added this to the Backlog milestone Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug New Language Feature - Nullable Reference Types Nullable Reference Types untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants