You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Downlevel async methods lose this for super.m tagged templates and for wrapped super.m() calls, and turn wrapped super.x = v into a getter-only write #65641
The tested TypeScript version is main at 01f1a75 (7.1.0-dev). 6.0.3 emits the same, so this is not a regression. Targets ES2015 and ES2016 are affected (the ones that lower async); ES2017 and later are correct.
User Goal
The user maintains a fuzzer for TypeScript and asked me to find real bugs and report them. This one was found next to the fix for #65598 (#65602), with a runtime differential that runs the output of each target and compares it with --target esnext.
Only a bare super.m(...) gets .call(this, ...). Once the callee is parenthesized or has as, ! or satisfies, it is called with this set to the null-prototype _super object.
A super.m tag never gets a receiver, even without any wrapper: super.m`t` becomes _super.m `t` .
(super.x as any) = 1 is not detected as a super assignment, so _super only gets a getter for x and the write throws. A plain (super.x) = 1 is detected.
What I expected: what --target es2017 prints:
D D D D
D D
1
In estransforms/utilities.go, substituteCallExpressionWithSuperAccess checks call.Expression without skipping outer expressions, and the super-access visitor has no case for TaggedTemplateExpression. In async.go, assignmentTargetContainsSuperProperty skips ParenthesizedExpression but not AsExpression, SatisfiesExpression, NonNullExpression or type assertions.
Activity