Skip to content

Commit 7fd8c62

Browse files
committed
WildcardNamedWithAsPattern: fix rule
Fix rule WildcardNamedWithAsPattern that was broken when porting to FCS version 41. Removed misleading comment.
1 parent 752223a commit 7fd8c62

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/FSharpLint.Core/Rules/Conventions/Binding/WildcardNamedWithAsPattern.fs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ let private checkForWildcardNamedWithAsPattern pattern =
1818

1919
let private runner (args:AstNodeRuleParams) =
2020
match args.AstNode with
21-
| AstNode.Pattern(SynPat.Wild(_) as pattern) ->
22-
checkForWildcardNamedWithAsPattern pattern
21+
| AstNode.Pattern(SynPat.As(leftHandSide, _, _)) ->
22+
checkForWildcardNamedWithAsPattern leftHandSide
2323
| _ -> Array.empty
2424

25-
/// Checks if any code uses 'let _ = ...' and suggests to use the ignore function.
2625
let rule =
2726
{ Name = "WildcardNamedWithAsPattern"
2827
Identifier = Identifiers.WildcardNamedWithAsPattern

0 commit comments

Comments
 (0)