You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program returns 120 in S5, should throw an exception (because the f variable should shadow the recursive binding):
var x = function f (a) { var f; if (a == 0) return 1; else return a * f(a-1) }; x(5)
Reason: ES5 chapter 13 says that a new scope should be introduced for the recursive binding, but S5's desugaring puts the recursive binding directly in the function's scope.
The text was updated successfully, but these errors were encountered:
The following program returns 120 in S5, should throw an exception (because the f variable should shadow the recursive binding):
Reason: ES5 chapter 13 says that a new scope should be introduced for the recursive binding, but S5's desugaring puts the recursive binding directly in the function's scope.
The text was updated successfully, but these errors were encountered: