Skip to content

Commit 5ab3d34

Browse files
committed
Compiler: fix for let/const inside try-catch block
1 parent a2d3b4f commit 5ab3d34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/lib/js_assign.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ module Preserve : Strategy = struct
257257
let record_block t scope (b : Js_traverse.block) =
258258
let defs =
259259
match b with
260-
| Catch (p, _) -> bound_idents_of_binding p
260+
| Catch (p, _) ->
261+
bound_idents_of_binding p
262+
@ Javascript.IdentSet.elements scope.Js_traverse.def_local
261263
| Normal -> Javascript.IdentSet.elements scope.Js_traverse.def_local
262264
| Params _ ->
263265
Javascript.IdentSet.elements

0 commit comments

Comments
 (0)