dotnet/roslyn

`IsPreprocessorKeyword` documentation comment doesn't match implementation

Aperta

#54.604 aperta il 4 lug 2021

 (0 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBughelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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).

Guida contributor