dotnet/roslyn

VB boolean literals not highlighted as keywords in SymbolDisplay.ToDisplayParts

Ouverte

#30 960 ouverte le 5 nov. 2018

 (1 commentaire) (0 réaction) (0 personne assignée)C# (4 257 forks)batch import
4 - In ReviewArea-CompilersBughelp wanted

Métriques du dépôt

Stars
 (20 414 étoiles)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

Create a C# project and a VB project referencing it. C# file:

public class CS
{
    public const bool Const = true;
}

VB with completion invoked at |.

Module VB
    Sub M()
        CS.|
    End Sub
End Module

image Expected behavior: True is colored as a keyword Actual behavior: it's not

This is because in the result of calling SymbolDisplay.ToDisplayParts on the field, the part with the true keyword has a kind of SymbolDisplayPartKind.NumericLiteral as opposed to SymbolDisplayPartKind.Keyword (so this bug is in the compiler).

Guide contributeur