dotnet/roslyn

'Use pattern-matching' should be missing on writes from local function captures

Offen

#29.512 geöffnet am 24.08.2018

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C# (4.257 Forks)batch import
Area-IDEBughelp wanted

Repository-Metriken

Stars
 (20.414 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)

Beschreibung

From https://github.com/dotnet/roslyn/pull/26097#discussion_r210728805

We should look for writes that are logically within the span, but syntactically are not.

var s = field as string;
WriteField();
if (s != null) { ... }

void WriteField () => field = null;

/cc @sharwell

Contributor Guide