69f5882b97
This fixes two closure bugs. First, we had special cased `__awaiter` from days of yore, when we had special cased its capture. I also think we were confused at some point and instead of fixing the fact that we captured `this` for non-arrow functions, which `__awaiter` would trigger, we doubled down on this incorrect hack. This means we missed a real bonafide `this` capture. Second, we had a global cache of captured variable objects. So, if a free variable resolved to the same JavaScript object, it always resolved to the first serialization of that object. This is clearly wrong if the object had been mutated in the meantime. The cache is required to reach a fixed point during mutually recursive captures, but we should only be using it for the duration of a single closure serialization call. That's precisely what this commit does. Also add a fix for this case. This fixes pulumi/pulumi#663. |
||
---|---|---|
.. | ||
index.ts |