regenerator
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -834,3 +834,6 @@ /** | ||
path.get("arguments").map(function(argPath) { | ||
return explodeViaTempVar(null, argPath); | ||
return explodeViaTempVar( | ||
hasLeapingChildren ? self.makeTempVar() : null, | ||
argPath | ||
); | ||
}) | ||
@@ -845,3 +848,6 @@ )); | ||
propPath.value.key, | ||
explodeViaTempVar(null, propPath.get("value")) | ||
explodeViaTempVar( | ||
hasLeapingChildren ? self.makeTempVar() : null, | ||
propPath.get("value") | ||
) | ||
); | ||
@@ -854,3 +860,6 @@ }) | ||
path.get("elements").map(function(elemPath) { | ||
return explodeViaTempVar(null, elemPath); | ||
return explodeViaTempVar( | ||
hasLeapingChildren ? self.makeTempVar() : null, | ||
elemPath | ||
); | ||
}) | ||
@@ -857,0 +866,0 @@ )); |
@@ -19,3 +19,3 @@ { | ||
], | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"homepage": "http://github.com/facebook/regenerator", | ||
@@ -22,0 +22,0 @@ "repository": { |
@@ -763,1 +763,23 @@ /** | ||
}); | ||
describe("object literals with multiple yields", function() { | ||
it("should receive different sent values", function() { | ||
function *gen(fn) { | ||
return { | ||
a: yield "a", | ||
b: yield "b", | ||
c: fn(yield "c", yield "d"), | ||
d: [yield "e", yield "f"] | ||
}; | ||
} | ||
check(gen(function sum(x, y) { | ||
return x + y; | ||
}), ["a", "b", "c", "d", "e", "f"], { | ||
a: 1, | ||
b: 2, | ||
c: 3 + 4, | ||
d: [5, 6] | ||
}); | ||
}); | ||
}); |
76804
2308