Repository navigation
Commit e8dc414
committed
fix(compiler): handle nested awaits in settled and resolve helper event types
Bug 1: settled() treated AwaitExpression as non-thenable via nonPromise(),
so await (cond ? await load() : null) was classified as zero-delay. Add an
AwaitExpression case that recurses on the argument, and make ConditionalExpression
and LogicalExpression use staticValue to skip unreachable branches.
Bug 2: eventType() and captureOf() used staticValue() which does not follow
frameArgument, so helper parameters always resolved to UNKNOWN. UNKNOWN
matches any type/capture, letting mismatched event types or capture flags
pass as valid releases. Add frameArgument resolution to both functions.1 parent e466050 commit e8dc414
1 file changed
Lines changed: 33 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
345 | 347 | | |
346 | | - | |
347 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
348 | 361 | | |
349 | 362 | | |
350 | 363 | | |
| |||
697 | 710 | | |
698 | 711 | | |
699 | 712 | | |
700 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
701 | 722 | | |
702 | 723 | | |
703 | 724 | | |
704 | 725 | | |
705 | | - | |
| 726 | + | |
706 | 727 | | |
707 | 728 | | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
708 | 736 | | |
709 | 737 | | |
710 | 738 | | |
| |||
0 commit comments