Skip to content

Commit 9adb71b

Browse files
committed
tweak: add a test
1 parent 8545c9e commit 9adb71b

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

jscomp/frontend/ast_payload.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ let raw_as_string_exp_exn
8585
Bs_flow_ast_utils.check_flow_errors ~loc ~offset:(Bs_flow_ast_utils.flow_deli_offset deli) (match kind with
8686
| Raw_re
8787
| Raw_exp ->
88-
let (_loc,e),errors = (Parser_flow.parse_expression (Parser_env.init_env None str) false) in
88+
let (_loc,e),errors = Parser_flow.parse_expression (Parser_env.init_env None str) false in
8989
if kind = Raw_re then
9090
(match e with
9191
| Literal {value = RegExp _} -> ()

jscomp/test/build.ninja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ o test/gpr_4519_test.cmi test/gpr_4519_test.cmj : cc test/gpr_4519_test.ml | tes
334334
o test/gpr_459_test.cmi test/gpr_459_test.cmj : cc test/gpr_459_test.ml | test/mt.cmj $stdlib
335335
o test/gpr_4639_test.cmi test/gpr_4639_test.cmj : cc test/gpr_4639_test.ml | $stdlib
336336
o test/gpr_4924_test.cmi test/gpr_4924_test.cmj : cc test/gpr_4924_test.ml | $stdlib
337+
o test/gpr_4931.cmi test/gpr_4931.cmj : cc test/gpr_4931.ml | $stdlib
337338
o test/gpr_627_test.cmi test/gpr_627_test.cmj : cc test/gpr_627_test.ml | test/mt.cmj $stdlib
338339
o test/gpr_658.cmi test/gpr_658.cmj : cc test/gpr_658.ml | $stdlib
339340
o test/gpr_858_test.cmi test/gpr_858_test.cmj : cc test/gpr_858_test.ml | $stdlib

jscomp/test/gpr_4931.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
4+
if (import.meta.hot){
5+
console.log('es6')
6+
}
7+
;
8+
9+
/* Not a pure module */

jscomp/test/gpr_4931.ml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
[@@@config {
3+
flags = [|"-w";"-103"|]
4+
}]
5+
6+
7+
[%%raw{|
8+
if (import.meta.hot){
9+
console.log('es6')
10+
}
11+
|}]

0 commit comments

Comments
 (0)