Debug assertion failure in GuardedAddBoundTreeForStandaloneSyntax
Open
Area-Compilers
Bug
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Version Used**:
**Steps to Reproduce**:
While debugging Roslyn with an open instance of Compilers.slnf, I observed the following assertion fail:
https://github.com/dotnet/roslyn/blob/fa64d902770e1aa9c7aaf89fa0e9dac2f463085c/src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs#L1510-L1514
It's happening in the evaluation of `Binder.DoUncheckedConversion` in a speculative semantic model, and appears to impact code where the entire block body of a method is wrapped in `unchecked { }`. The `manager` is non-null, but the `syntax != Root`. Perhaps the assertion should be changed to `syntax == GetBindableSyntaxNode(Root)`?
Contributor guide
Assessment
This issue has not been assessed yet.