Skip to content

Commit f9f09c4

Browse files
committed
a nasty bug without begin end inside if
when adding `let xxx` inside if
1 parent 917dde4 commit f9f09c4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jscomp/core/js_implementation.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,12 @@ let after_parsing_impl ppf outputprefix (ast : Parsetree.structure) =
165165
Ml_binary.write_ast Ml !Location.input_name ast oc;
166166
close_out oc ;
167167
end;
168-
if !Js_config.binary_ast then
168+
if !Js_config.binary_ast then begin
169169
let sourcefile = !Location.input_name in
170170
Binary_ast.write_ast ~sourcefile
171171
Ml ~output:(outputprefix ^ Filename.extension sourcefile ^ "ast")
172-
ast ;
172+
ast
173+
end ;
173174
if !Js_config.syntax_only then
174175
Warnings.check_fatal ()
175176
else

0 commit comments

Comments
 (0)