Skip to content

Commit

Permalink
HintMatcher: fix potential crash (#608)
Browse files Browse the repository at this point in the history
Fixes #341
  • Loading branch information
Thorium authored Dec 7, 2023
1 parent 06bb0af commit 323223f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FSharpLint.Core/Rules/Hints/HintMatcher.fs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ module private MatchExpression =
| _ -> NoMatch
| Expression.Variable(var) ->
match expr with
| AstNode.Expression(expr) -> arguments.MatchedVariables.Add(var, expr)
| AstNode.Expression(expr) -> arguments.MatchedVariables.TryAdd(var, expr) |> ignore
| _ -> ()
Match([])
| Expression.Wildcard ->
Expand Down

0 comments on commit 323223f

Please sign in to comment.