Skip to content

Commit a63b468

Browse files
committed
remove check for empty record pattern match
1 parent 73d3810 commit a63b468

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

jscomp/frontend/bs_ast_invariant.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ let emit_external_warnings : iterator =
166166
(fun self (pat : Parsetree.pattern) ->
167167
match pat.ppat_desc with
168168
| Ppat_constant constant -> check_constant pat.ppat_loc constant
169-
| Ppat_record ([], _) ->
170-
Location.raise_errorf ~loc:pat.ppat_loc
171-
"Empty record pattern is not supported"
172169
| _ -> super.pat self pat);
173170
}
174171

jscomp/ml/typecore.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,6 @@ and type_pat_aux ~constrs ~labels ~no_existentials ~mode ~explode ~env
12731273
| _ -> k None
12741274
end
12751275
| Ppat_record(lid_sp_list, closed) ->
1276-
(*assert (lid_sp_list <> []);*)
12771276
let opath, record_ty =
12781277
try
12791278
let (p0, p, _, _) = extract_concrete_record !env expected_ty in

0 commit comments

Comments
 (0)