-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
dotnet/razor-compiler
#36Labels
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
If a user has a typeparam directive with a ; the ; is omitted from the SyntaxTree. This causes problem for Semantic Classification (and I'm sure many other scenarios) because the SyntaxTree is now shorter than the document. I believe that it is a requirement that the SyntaxTree always be the same length as the document, as enforced by this check.
Expected Behavior
The SyntaxTree should be the same length as the document, and the ; should be somehow represented in it.
Steps To Reproduce
I created this commit with a failing unit test for this scenario. I don't know if the cspans.txt and stree.txt reflect our actual expectations in this scenario, but it demonstrates the shortened SyntaxTree and how that fails the SyntaxTreeVerifier.
Exceptions (if any)
No response
.NET Version
6.0.200-preview.22055.15
Anything else?
No response
Reactions are currently unavailable