Skip to content

Commit 4ec1a86

Browse files
Prevent jump out of boxed function in JS (#882)
Closes #881 Solution proposed by @jiribenes, seems to solve the issue! Co-authored-by: Jiří Beneš <[email protected]>
1 parent 9676010 commit 4ec1a86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

effekt/shared/src/main/scala/effekt/generator/js/TransformerCps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ object TransformerCps extends Transformer {
200200
case DirectApp(id, vargs, bargs) => js.Call(nameRef(id), vargs.map(toJS) ++ bargs.map(argumentToJS))
201201
case Pure.PureApp(id, vargs) => inlineExtern(id, vargs)
202202
case Pure.Make(data, tag, vargs) => js.New(nameRef(tag), vargs map toJS)
203-
case Pure.Box(b) => toJS(b)
203+
case Pure.Box(b) => argumentToJS(b)
204204
}
205205

206206
def toJS(s: cps.Stmt)(using D: TransformerContext): Binding[List[js.Stmt]] = s match {

0 commit comments

Comments
 (0)