File tree Expand file tree Collapse file tree 6 files changed +36
-3
lines changed Expand file tree Collapse file tree 6 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 11(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
2- *
2+ * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript
33 * This program is free software: you can redistribute it and/or modify
44 * it under the terms of the GNU Lesser General Public License as published by
55 * the Free Software Foundation, either version 3 of the License, or
@@ -185,6 +185,8 @@ let emit_external_warnings : iterator=
185185 match pat.ppat_desc with
186186 | Ppat_constant (constant ) ->
187187 check_constant pat.ppat_loc `pat constant
188+ | Ppat_record ([] ,_ ) ->
189+ Location. raise_errorf ~loc: pat.ppat_loc " Empty record pattern is not supported"
188190 | _ -> super.pat self pat
189191 end
190192 }
Original file line number Diff line number Diff line change @@ -548,6 +548,7 @@ o test/recursive_records_test.cmi test/recursive_records_test.cmj : cc test/recu
548548o test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj : cc test/recursive_unbound_module_test.ml | $stdlib
549549o test/regression_print.cmi test/regression_print.cmj : cc test/regression_print.ml | $stdlib
550550o test/relative_path.cmi test/relative_path.cmj : cc test/relative_path.ml | $stdlib
551+ o test/res_debug.cmi test/res_debug.cmj : cc test/res_debug.res | $stdlib
551552o test/return_check.cmi test/return_check.cmj : cc test/return_check.ml | $stdlib
552553o test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj : cc test/runtime_encoding_test.ml | $stdlib
553554o test/scanf_io.cmi test/scanf_io.cmj : cc test/scanf_io.ml | test/testing.cmj $stdlib
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+
4+ var u = 0 ;
5+
6+ exports . u = u ;
7+ /* No side effect */
Original file line number Diff line number Diff line change 1+ @@config ({
2+ flags : [
3+ /* "-w";
4+ "@A" */
5+ /* "-drawlambda"; */
6+ /* "-dtypedtree"; */
7+ /* "-bs-diagnose"; */
8+ "-dparsetree" ,
9+ /* "-dsource"; */
10+ ],
11+ })
12+ type t = { x : int , y : int }
13+
14+ // let f = (x,y) => {
15+ // let {} = {x,y}
16+ // x + y
17+ // }
18+
19+ let u = # 0
Original file line number Diff line number Diff line change @@ -398359,7 +398359,7 @@ val emit_external_warnings_on_signature:
398359398359end = struct
398360398360#1 "bs_ast_invariant.ml"
398361398361(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
398362- *
398362+ * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript
398363398363 * This program is free software: you can redistribute it and/or modify
398364398364 * it under the terms of the GNU Lesser General Public License as published by
398365398365 * the Free Software Foundation, either version 3 of the License, or
@@ -398533,6 +398533,8 @@ let emit_external_warnings : iterator=
398533398533 match pat.ppat_desc with
398534398534 | Ppat_constant(constant) ->
398535398535 check_constant pat.ppat_loc `pat constant
398536+ | Ppat_record ([],_) ->
398537+ Location.raise_errorf ~loc:pat.ppat_loc "Empty record pattern is not supported"
398536398538 | _ -> super.pat self pat
398537398539 end
398538398540 }
Original file line number Diff line number Diff line change @@ -293901,7 +293901,7 @@ val emit_external_warnings_on_signature:
293901293901end = struct
293902293902#1 "bs_ast_invariant.ml"
293903293903(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
293904- *
293904+ * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript
293905293905 * This program is free software: you can redistribute it and/or modify
293906293906 * it under the terms of the GNU Lesser General Public License as published by
293907293907 * the Free Software Foundation, either version 3 of the License, or
@@ -294075,6 +294075,8 @@ let emit_external_warnings : iterator=
294075294075 match pat.ppat_desc with
294076294076 | Ppat_constant(constant) ->
294077294077 check_constant pat.ppat_loc `pat constant
294078+ | Ppat_record ([],_) ->
294079+ Location.raise_errorf ~loc:pat.ppat_loc "Empty record pattern is not supported"
294078294080 | _ -> super.pat self pat
294079294081 end
294080294082 }
You can’t perform that action at this time.
0 commit comments