https://codereview.chromium.org/1127063003/diff/100001/test/mjsunit/harmony/optional-arguments.js
File test/mjsunit/harmony/optional-arguments.js (right):
https://codereview.chromium.org/1127063003/diff/100001/test/mjsunit/harmony/optional-arguments.js#newcode55
test/mjsunit/harmony/optional-arguments.js:55:
On 2015/05/12 14:04:53, rossberg wrote:
More tests, e.g.:
- (function(x = this) { return x }).call(o) === o
- (function(x = () => this) { return x() }).call(o) === o
- (function f(x, y = f) { return x ? y(false) + 1 : 0 })(true) === 1
- (function(x, y = function() { return x }) { return y() })(7) === 7
- (function(x = function() { return y }, y) { return x() })(8) === 8
- (function(x, y = eval("x")) { let x; return y })(7) === 7
- (function(x = eval("y"), y = 0) {})() throws
- (function(x, y = () => eval("x")) { let x; return y() })(7) === 7
- (function(x = () => eval("y"), y = 9) { let y; return x() })() === 9
- (function(x = {a: 4}) { return x.a })() === 4
- (function(x, y = {a: x}) { return y.a })(5) === 5
- a function large enough to trigger lazy parsing
Added eval and arrow variants to a bunch of these tests --- something is
very broken with the TDZ behaviour when "eval" is used, I'm not sure if
this affects normal lexical variables or not. If it does I'll file a bug
https://codereview.chromium.org/1127063003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.