Skip to content

Commit

Permalink
SuggestUseAutoProperty: check for static props
Browse files Browse the repository at this point in the history
Make rule pass test introduced in previous commit by checking
if poperty is static or instance property.
  • Loading branch information
webwarrior-ws committed Dec 6, 2023
1 parent 8092d5f commit f9677fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let private runner (args: AstNodeRuleParams) =
false,
_attributes,
_xmlDoc,
_valData,
SynValData(Some(memberFlags), _, _),
SynPat.LongIdent (_, _, _, argPats, _, _),
_returnInfo,
expr,
Expand All @@ -67,7 +67,7 @@ let private runner (args: AstNodeRuleParams) =
),
memberRange
)
) ->
) when memberFlags.IsInstance ->
match expr, argPats with
| _, SynArgPats.Pats pats when pats.Length > 0 -> // non-property member
Array.empty
Expand Down

0 comments on commit f9677fa

Please sign in to comment.