michael@0: // Arrow functions can have primitive |this| values. michael@0: michael@0: Number.prototype.foo = function() { michael@0: "use strict"; michael@0: return () => this; michael@0: } michael@0: michael@0: for (var i=0; i<5; i++) { michael@0: var n = i.foo()(); michael@0: assertEq(typeof n, "number"); michael@0: assertEq(n, i); michael@0: }