dotnet/roslyn

VB boolean literals not highlighted as keywords in SymbolDisplay.ToDisplayParts

开放

#30,960 创建于 2018年11月5日

 (1 条评论) (0 个反应) (0 位负责人)C# (4,257 个派生)batch import
4 - In ReviewArea-CompilersBughelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

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

贡献者指南