We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d184bc commit d16cbc1Copy full SHA for d16cbc1
src/FSharpLint.Core/Rules/Conventions/DisallowShadowing.fs
@@ -123,8 +123,14 @@ let private checkIdentifier (args: AstNodeRuleParams) (identifier: Ident) : arra
123
| _ -> false
124
125
let parents = args.GetParents args.NodeIndex
126
- let isShadowing =
127
- parents |> List.exists processAstNode
+ let isShadowing =
+ let currentDefinition =
128
+ definitionsWithSameName |> Seq.tryFind (fun definition -> definition.Range = identifier.idRange)
129
+ match currentDefinition with
130
+ | Some _ ->
131
+ parents |> List.exists processAstNode
132
+ | None ->
133
+ false
134
135
if isShadowing then
136
Array.singleton {
0 commit comments