Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions analysis/reanalyze/src/dead_optional_args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ let rec from_type_expr_with_arity (texpr : Types.type_expr) arity =
else
match texpr.desc with
| _ when not (active ()) -> []
| Tarrow ({lbl = Optional {txt = s}}, t_to, _, _) ->
| Tarrow ({lbl = Optional {txt = s}}, t_to, _) ->
s :: from_type_expr_with_arity t_to (arity - 1)
| Tarrow (_, t_to, _, _) -> from_type_expr_with_arity t_to (arity - 1)
| Tarrow (_, t_to, _) -> from_type_expr_with_arity t_to (arity - 1)
| Tlink t -> from_type_expr_with_arity t arity
| Tsubst t -> from_type_expr_with_arity t arity
| _ -> []

let rec from_type_expr_with_declared_arity (texpr : Types.type_expr) =
match texpr.desc with
| Tarrow (_, _, _, Some arity) -> from_type_expr_with_arity texpr arity
| Tarrow (_, _, Some arity) -> from_type_expr_with_arity texpr arity
| Tlink t -> from_type_expr_with_declared_arity t
| Tsubst t -> from_type_expr_with_declared_arity t
| _ -> from_type_expr texpr
Expand Down
Loading