dotnet/roslyn
View on GitHub`Microsoft.CodeAnalysis.VisualBasic.SyntaxFactory.RegionDirectiveTrivia()` throws ArgumentOutOfRangeException
Open
#69,258 opened on Jul 27, 2023
Area-CompilersBughelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
Version Used: 4.6.0.0 Steps to Reproduce:
Call SyntaxFactory.RegionDirectiveTrivia without parameters:
Microsoft.CodeAnalysis.VisualBasic.SyntaxFactory.RegionDirectiveTrivia()
Expected Behavior: Works.
Actual Behavior:
Throws System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'kind')
Relevant part of the stack:
Stack Trace: SyntaxFactory.VerifySyntaxKindOfToken(SyntaxKind kind) SyntaxFactory.Token(SyntaxKind kind, String text) SyntaxFactory.RegionDirectiveTrivia()