Skip to content

Commit f81b87c

Browse files
committed
Decrement in deferred wrapper func to fix #1127
1 parent b5aa655 commit f81b87c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/expressions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ func (fc *funcContext) delegatedCall(expr *ast.CallExpr) (callable *expression,
885885
Args: callArgs,
886886
Ellipsis: expr.Ellipsis,
887887
}
888-
callable = fc.formatExpr("function(%s) { %e; }", strings.Join(vars, ", "), wrapper)
888+
callable = fc.formatExpr("function(%s) { $stackDepthOffset--; %e; }", strings.Join(vars, ", "), wrapper)
889889
arglist = fc.formatExpr("[%s]", strings.Join(args, ", "))
890890
return callable, arglist
891891
}

0 commit comments

Comments
 (0)