Skip to content

Commit 65116cd

Browse files
committed
fixup! Add location after return statement
1 parent c9488bb commit 65116cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/lib/js_traverse.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,10 @@ class simpl =
17541754
, (Return_statement (Some e1, _), _)
17551755
, Some (Return_statement (Some e2, _), _) ) ->
17561756
( Return_statement
1757-
(Some (ECond (cond, e1, e2)), U (*ZZZ Use end of function? *))
1757+
( Some (ECond (cond, e1, e2))
1758+
, U
1759+
(*TODO: it would be better to use the location of the
1760+
end of the function, but we can't easily get it. *) )
17581761
, loc )
17591762
:: rem
17601763
(* if (e1) v1 = e2 else v1 = e3 --> v1 = e1 ? e2 : e3 *)

0 commit comments

Comments
 (0)