Skip to content

Commit

Permalink
Expand things a bit to call out that there is a 'this' parameter bein…
Browse files Browse the repository at this point in the history
…g read
  • Loading branch information
RikkiGibson committed Aug 1, 2019
1 parent 140b0eb commit 1770001
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public async Task<AnalyzerResult> AnalyzeAsync()

var instanceMemberIsUsed = thisParameterBeingRead != null || isThisParameterWritten;
var shouldBeReadOnly = !isThisParameterWritten
&& thisParameterBeingRead?.Type is { TypeKind: TypeKind.Struct, IsReadOnly: false };
&& thisParameterBeingRead != null
&& thisParameterBeingRead.Type is { TypeKind: TypeKind.Struct, IsReadOnly: false };

// check whether end of selection is reachable
var endOfSelectionReachable = IsEndOfSelectionReachable(model);
Expand Down

0 comments on commit 1770001

Please sign in to comment.