dotnet/roslyn
VB boolean literals not highlighted as keywords in SymbolDisplay.ToDisplayParts
オープン
#30,960 opened on 2018/11/05
4 - In ReviewArea-CompilersBughelp wanted
Repository metrics
- Stars
- (20,414 個のスター)
- PR merge metrics
- (平均マージ 6d 17h) (30d で 256 merged PRs)
説明
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
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).