Skip to content

Commit 425e41f

Browse files
authored
Merge pull request #2054 from smuenzel/keep-expansion-fix
Add type annotation to Destruct.refine_complete_match to avoid type scope escape
2 parents eb413b2 + 7448900 commit 425e41f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/analysis/destruct.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,10 @@ let refine_and_generate_branches patt config source patterns sub_patterns =
696696
(top_patt.Typedtree.pat_loc, str)
697697

698698
let refine_complete_match (type a) parents (patt : a Typedtree.general_pattern)
699-
config source patterns =
699+
config source (patterns : Typedtree.pattern list) =
700700
match Typedtree.classify_pattern patt with
701701
| Computation -> raise (Not_allowed "computation pattern")
702702
| Value ->
703-
let _ : Typedtree.value Typedtree.general_pattern = patt in
704703
if not (destructible patt) then raise Nothing_to_do
705704
else
706705
let ty = patt.Typedtree.pat_type in

0 commit comments

Comments
 (0)