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 1
1
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
2
- *
2
+ * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript
3
3
* This program is free software: you can redistribute it and/or modify
4
4
* it under the terms of the GNU Lesser General Public License as published by
5
5
* the Free Software Foundation, either version 3 of the License, or
@@ -185,6 +185,8 @@ let emit_external_warnings : iterator=
185
185
match pat.ppat_desc with
186
186
| Ppat_constant (constant ) ->
187
187
check_constant pat.ppat_loc `pat constant
188
+ | Ppat_record ([] ,_ ) ->
189
+ Location. raise_errorf ~loc: pat.ppat_loc " Empty record pattern is not supported"
188
190
| _ -> super.pat self pat
189
191
end
190
192
}
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
548
548
o test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj : cc test/recursive_unbound_module_test.ml | $stdlib
549
549
o test/regression_print.cmi test/regression_print.cmj : cc test/regression_print.ml | $stdlib
550
550
o 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
551
552
o test/return_check.cmi test/return_check.cmj : cc test/return_check.ml | $stdlib
552
553
o test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj : cc test/runtime_encoding_test.ml | $stdlib
553
554
o 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:
398359
398359
end = struct
398360
398360
#1 "bs_ast_invariant.ml"
398361
398361
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
398362
- *
398362
+ * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript
398363
398363
* This program is free software: you can redistribute it and/or modify
398364
398364
* it under the terms of the GNU Lesser General Public License as published by
398365
398365
* the Free Software Foundation, either version 3 of the License, or
@@ -398533,6 +398533,8 @@ let emit_external_warnings : iterator=
398533
398533
match pat.ppat_desc with
398534
398534
| Ppat_constant(constant) ->
398535
398535
check_constant pat.ppat_loc `pat constant
398536
+ | Ppat_record ([],_) ->
398537
+ Location.raise_errorf ~loc:pat.ppat_loc "Empty record pattern is not supported"
398536
398538
| _ -> super.pat self pat
398537
398539
end
398538
398540
}
Original file line number Diff line number Diff line change @@ -293901,7 +293901,7 @@ val emit_external_warnings_on_signature:
293901
293901
end = struct
293902
293902
#1 "bs_ast_invariant.ml"
293903
293903
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
293904
- *
293904
+ * Copyright (C) 2017- Hongbo Zhang, Authors of ReScript
293905
293905
* This program is free software: you can redistribute it and/or modify
293906
293906
* it under the terms of the GNU Lesser General Public License as published by
293907
293907
* the Free Software Foundation, either version 3 of the License, or
@@ -294075,6 +294075,8 @@ let emit_external_warnings : iterator=
294075
294075
match pat.ppat_desc with
294076
294076
| Ppat_constant(constant) ->
294077
294077
check_constant pat.ppat_loc `pat constant
294078
+ | Ppat_record ([],_) ->
294079
+ Location.raise_errorf ~loc:pat.ppat_loc "Empty record pattern is not supported"
294078
294080
| _ -> super.pat self pat
294079
294081
end
294080
294082
}
You can’t perform that action at this time.
0 commit comments