Repository navigation
Commit 509f453
committed
fix(compiler): exclude var initializers from localInit in strong effect analysis
var declarations are hoisted with undefined before their initializer runs,
so crediting a var initializer as already evaluated can let awaitYields
falsely treat `await ready` as yielding when ready is still undefined.
Only const/let bindings (which have TDZ) guarantee their initializer ran
before any reference.1 parent 9ed465a commit 509f453
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
286 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
| |||
0 commit comments