Sign in
webkit
/
WebKit
/
36234e633907e0345e06a39a886b5b9fff0ba3fe
/
.
/
JSTests
/
es6
/
destructuring_parenthesised_left-hand-side_is_a_syntax_error.js
blob: ec78510580878bbbf890aa4fe3521d93cb57cfc6 [
file
] [
log
] [
blame
]
function
test
()
{
var
a
,
b
;
({
a
,
b
}
=
{
a
:
1
,
b
:
2
});
try
{
eval
(
"({a,b}) = {a:3,b:4};"
);
}
catch
(
e
)
{
return
a
===
1
&&
b
===
2
;
}
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);