Skip to content

Commit 4062878

Browse files
knoctewebwarrior-ws
andcommitted
DisallowShadowing: fix build
Co-authored-by: webwarrior-ws <reg@webwarrior.ws>
1 parent e5c685f commit 4062878

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/FSharpLint.Core/Rules/Conventions/DisallowShadowing.fs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open FSharpLint.Framework.Suggestion
77
open FSharpLint.Framework.Ast
88
open FSharpLint.Framework.Rules
99

10-
let rec private extractIdentifiersFromSimplePats (simplePats: SynSimplePats) : List<Ident> =
10+
let private extractIdentifiersFromSimplePats (simplePats: SynSimplePats) : List<Ident> =
1111
let rec extractIdentifier (pattern: SynSimplePat) =
1212
match pattern with
1313
| SynSimplePat.Id(ident, _, _, _, _, _) ->
@@ -17,10 +17,8 @@ let rec private extractIdentifiersFromSimplePats (simplePats: SynSimplePats) : L
1717
extractIdentifier pat
1818

1919
match simplePats with
20-
| SynSimplePats.SimplePats(patterns, _) ->
20+
| SynSimplePats.SimplePats(patterns, _, _) ->
2121
patterns |> List.map extractIdentifier
22-
| SynSimplePats.Typed(pats, _, _) ->
23-
extractIdentifiersFromSimplePats pats
2422

2523

2624
let private checkIdentifier (args: AstNodeRuleParams) (identifier: Ident) : array<WarningDetails> =
@@ -58,7 +56,7 @@ let private checkIdentifier (args: AstNodeRuleParams) (identifier: Ident) : arra
5856
match expression with
5957
| SynExpr.LetOrUse(_, _, bindings, _, _, _) ->
6058
bindings |> List.exists processBinding
61-
| SynExpr.Sequential(_, _, expr1, expr2, _) ->
59+
| SynExpr.Sequential(_, _, expr1, expr2, _, _) ->
6260
processExpression expr1 || processExpression expr2
6361
| SynExpr.Lambda(_, _, args, body, _, _, _) ->
6462
processExpression body || processArgs args
@@ -74,7 +72,7 @@ let private checkIdentifier (args: AstNodeRuleParams) (identifier: Ident) : arra
7472
| SynPat.OptionalVal(ident, _) -> rangeIncludedsDefinitions ident.idRange
7573
| SynPat.Paren(pat, _) -> processPattern pat
7674
| SynPat.Record(fieldPats, _) -> fieldPats |> List.exists (fun (_, _, pat) -> processPattern pat)
77-
| SynPat.Tuple(_, pats, _) -> pats |> List.exists processPattern
75+
| SynPat.Tuple(_, pats, _, _) -> pats |> List.exists processPattern
7876
| SynPat.Typed(pat, _, _) -> processPattern pat
7977
| _ -> false
8078

@@ -98,8 +96,8 @@ let private checkIdentifier (args: AstNodeRuleParams) (identifier: Ident) : arra
9896
processPattern pattern
9997
| MemberDefinition(SynMemberDefn.Member(memberDefn, _)) ->
10098
processBinding memberDefn
101-
| TypeDefinition(SynTypeDefn(_, _, _, Some(SynMemberDefn.ImplicitCtor(_, _, ctorArgs, _, _, _)), _, _)) ->
102-
processArgs ctorArgs
99+
| TypeDefinition(SynTypeDefn(_, _, _, Some(SynMemberDefn.ImplicitCtor(_, _, ctorArgs, _, _, _, _)), _, _)) ->
100+
processPattern ctorArgs
103101
| _ -> false
104102

105103
let parents = args.GetParents args.NodeIndex

0 commit comments

Comments
 (0)