dotnet/roslyn

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

Ouverte

#29 512 ouverte le 24 août 2018

 (1 commentaire) (0 réaction) (0 personne assignée)C# (4 257 forks)batch import
Area-IDEBughelp wanted

Métriques du dépôt

Stars
 (20 414 étoiles)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

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

Guide contributeur