Sign in
webkit
/
WebKit
/
c6951ff6f7d972427c05df8e7c39e3f2d74bf29c
/
.
/
JSTests
/
es6
/
destructuring_with_generator_instances.js
blob: 978abff041f479ed98735c9b19633f0074f9ede9 [
file
] [
log
] [
blame
]
function
test
()
{
var
[
a
,
b
,
c
]
=
(
function
*(){
yield
1
;
yield
2
;
}());
var
d
,
e
;
[
d
,
e
]
=
(
function
*(){
yield
3
;
yield
4
;
}());
return
a
===
1
&&
b
===
2
&&
c
===
undefined
&&
d
===
3
&&
e
===
4
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);