Skip to content

@typeparam TItem; causes invalid syntax tree due to missing ";" #39616

@ryanbrandenburg

Description

@ryanbrandenburg

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions