@@ -17,28 +17,28 @@ let rec checkExpression (expression: SynExpr) (range: range) (continuation: unit
1717 firstExpression
1818 range
1919 ( fun () -> ( checkExpression secondExpression secondExpression.Range returnEmptyArray))
20- | SynExpr.Paren ( innerExpression, _, _, range ) -> checkExpression innerExpression range returnEmptyArray
21- | SynExpr.While (_, _, innerExpression, range ) -> checkExpression innerExpression range returnEmptyArray
22- | SynExpr.For (_, _, _, _, _, _, _, innerExpression, range ) -> checkExpression innerExpression range returnEmptyArray
23- | SynExpr.ForEach (_, _, _, _, _, _, innerExpression, range ) -> checkExpression innerExpression range returnEmptyArray
24- | SynExpr.Match (_, _, clauses, range , _) ->
25- let subExpressions = clauses |> List.map ( fun ( SynMatchClause ( _ , _ , clause , range , _ , _ )) -> ( clause, range ))
20+ | SynExpr.Paren ( innerExpression, _, _, innerRange ) -> checkExpression innerExpression innerRange returnEmptyArray
21+ | SynExpr.While (_, _, innerExpression, innerRange ) -> checkExpression innerExpression innerRange returnEmptyArray
22+ | SynExpr.For (_, _, _, _, _, _, _, innerExpression, innerRange ) -> checkExpression innerExpression innerRange returnEmptyArray
23+ | SynExpr.ForEach (_, _, _, _, _, _, innerExpression, innerRange ) -> checkExpression innerExpression innerRange returnEmptyArray
24+ | SynExpr.Match (_, _, clauses, innerRange , _) ->
25+ let subExpressions = clauses |> List.map ( fun ( SynMatchClause ( _ , _ , clause , innerRange , _ , _ )) -> ( clause, innerRange ))
2626 checkMultipleExpressions subExpressions returnEmptyArray
27- | SynExpr.Do ( innerExpression, range ) -> checkExpression innerExpression range returnEmptyArray
27+ | SynExpr.Do ( innerExpression, innerRange ) -> checkExpression innerExpression innerRange returnEmptyArray
2828 | SynExpr.TryWith ( tryExpression, withCases, tryRange, _, _, _) ->
2929 let subExpressions =
3030 withCases |> List.map ( fun ( SynMatchClause ( _ , _ , withCase , withRange , _ , _ )) -> ( withCase, withRange))
3131 checkMultipleExpressions subExpressions ( fun () -> checkExpression tryExpression tryRange returnEmptyArray)
32- | SynExpr.TryFinally ( tryExpression, finallyExpr, range , _, _, _) ->
33- checkExpression tryExpression range ( fun () -> checkExpression finallyExpr range returnEmptyArray)
34- | SynExpr.IfThenElse (_, thenExpr, elseExpr, _, _, range , _) ->
32+ | SynExpr.TryFinally ( tryExpression, finallyExpr, innerRange , _, _, _) ->
33+ checkExpression tryExpression range ( fun () -> checkExpression finallyExpr innerRange returnEmptyArray)
34+ | SynExpr.IfThenElse (_, thenExpr, elseExpr, _, _, innerRange , _) ->
3535 checkExpression
3636 thenExpr
37- range
37+ innerRange
3838 ( fun () ->
3939 match elseExpr with
4040 | Some elseExpression ->
41- checkExpression elseExpression range returnEmptyArray
41+ checkExpression elseExpression innerRange returnEmptyArray
4242 | None -> Array.empty)
4343
4444 | SynExpr.App (_, _, SynExpr.Ident failwithId, _, _) when
@@ -53,18 +53,18 @@ let rec checkExpression (expression: SynExpr) (range: range) (continuation: unit
5353 SuggestedFix = None
5454 TypeChecks = List.Empty
5555 }
56- | SynExpr.App (_, _, funcExpr, _, range ) ->
57- checkExpression funcExpr range returnEmptyArray
58- | SynExpr.LetOrUse (_, _, _, body, range , _) ->
59- checkExpression body range returnEmptyArray
56+ | SynExpr.App (_, _, funcExpr, _, innerRange ) ->
57+ checkExpression funcExpr innerRange returnEmptyArray
58+ | SynExpr.LetOrUse (_, _, _, body, innerRange , _) ->
59+ checkExpression body innerRange returnEmptyArray
6060 | _ -> Array.empty)
6161 ( continuation ())
6262and [<TailCall>] checkMultipleExpressions ( expressions : list < SynExpr * range >) ( continuation : unit -> array < WarningDetails >) =
6363 match expressions with
64- | ( expression, range ) :: tail ->
64+ | ( expression, innerRange ) :: tail ->
6565 checkExpression
6666 expression
67- range
67+ innerRange
6868 ( fun () ->
6969 checkMultipleExpressions
7070 tail
0 commit comments