dotnet / project-system

The .NET Project System for Visual Studio
MIT License
969 stars 387 forks source link

Operator nameof is incorrectly highlighted in red #2613

Closed mariuszkochanowski closed 7 years ago

mariuszkochanowski commented 7 years ago

Version Used: Visual Studio 14.0.25431.01 Update 3 Visual Strudio 15.2 (26430.15) Steps to Reproduce: obraz

Code::

enum EnumExample
{
    Value1
}
public void DoSomething(Action action)
{
}

public void NameOfOperatorError()
{
    var tmp1 = nameof(EnumExample.Value1);

    DoSomething(() =>
    {
        var tmp2 = nameof(EnumExample.Value1);

        int a = 3;
        int b = 3;

        var c =

    });
}

Edited by @sharwell: Fixed formatting of code block

srivatsn commented 7 years ago

This issue was moved to dotnet/roslyn#21071