dotnet/roslyn

`IsPreprocessorKeyword` documentation comment doesn't match implementation

Open

#54,604 opened on Jul 4, 2021

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-CompilersBughelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

https://github.com/dotnet/roslyn/blob/43afd6dfd4b79380ff48078dfb264c60c518948c/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Services/SyntaxFacts/ISyntaxFacts.cs#L81-L85

The documentation says: "The set of identifiers that have special meaning directly after the # token". However, the implementation delegates to the following:

https://github.com/dotnet/roslyn/blob/43afd6dfd4b79380ff48078dfb264c60c518948c/src/Compilers/CSharp/Portable/Syntax/SyntaxKindFacts.cs#L68-L101

which returns true for things that, as far as I know, doesn't come "directly after" the # (for example TrueKeyword).

Contributor guide