File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -406,11 +406,11 @@ module ExpandCatchAllForVariants = struct
406
406
@ constructorNames
407
407
| _ -> constructorNames
408
408
in
409
- let getCurrentConstructorNames cases =
409
+ let getCurrentConstructorNames ? mode cases =
410
410
cases
411
411
|> List. map (fun (c : Parsetree.case ) ->
412
412
if Option. is_some c.pc_guard then []
413
- else findAllConstructorNames ~ mode: `option c.pc_lhs)
413
+ else findAllConstructorNames ? mode c.pc_lhs)
414
414
|> List. flatten
415
415
in
416
416
let currentConstructorNames = getCurrentConstructorNames cases in
@@ -481,7 +481,9 @@ module ExpandCatchAllForVariants = struct
481
481
in
482
482
match innerType with
483
483
| Some ((Tvariant _ | Tpolyvariant _ ) as variant ) ->
484
- let currentConstructorNames = getCurrentConstructorNames cases in
484
+ let currentConstructorNames =
485
+ getCurrentConstructorNames ~mode: `option cases
486
+ in
485
487
let hasNoneCase =
486
488
cases
487
489
|> List. exists (fun (c : Parsetree.case ) ->
You can’t perform that action at this time.
0 commit comments