csharp-tmLanguage icon indicating copy to clipboard operation
csharp-tmLanguage copied to clipboard

#else preprocessor directive loses colors with conditional operator

Open am11 opened this issue 6 years ago • 0 comments

Observed in GitHub and VSCode v1.30.2.

The colorization is lost after : NotSupportedByX_ConditionUnmet(); line onwards.

class A
{
    static bool B { get; } =
        Condition
#if X
            ? SupportedByXOnly_ConditionMet()
            : SupportedByXOnly_ConditionUnmet();
#else
            ? NotSupportedByX_ConditionMet()
            : NotSupportedByX_ConditionUnmet();

    [MyAttribute("Z")]
    const int Y = 1;
#endif
}

image

am11 avatar Feb 23 '19 21:02 am11