Sign in
webkit
/
WebKit
/
9f9c15eb6fdc193d77c7e606d643d4b8ec49399b
/
.
/
JSTests
/
es6
/
destructuring_throws_on_null_and_undefined.js
blob: abe4dcfd2c4f9f11cb467fef70ba2ca2cb4798c0 [
file
] [
log
] [
blame
]
function
test
()
{
try
{
var
{
a
}
=
null
;
return
false
;
}
catch
(
e
)
{}
try
{
var
{
b
}
=
undefined
;
return
false
;
}
catch
(
e
)
{}
return
true
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);