dotnet/roslyn

Explicit method group conversion suppresses unnecessary qualification warning

Open

#1,208 建立於 2015年3月12日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)C# (20,414 star) (4,257 fork)batch import
Area-AnalyzersBughelp wanted

描述

using System;

class X {
    void M() { R((Action)this.M); }
    void R(Action a) { }
}

(Action) is highlighted as unnecessary, but this. isn't. Removing (Action) correctly highlights it in gray.

Typename qualifiers for static methods are similarly missed, but namespace qualifiers are not.

貢獻者指南