File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3305,6 +3305,11 @@ namespace ts {
3305
3305
transformFlags |= TransformFlags . AssertTypeScript ;
3306
3306
}
3307
3307
3308
+ // Hoisted variables related to class properties should live within the TypeScript class wrapper.
3309
+ if ( isComputedPropertyName ( node . name ) || ( hasStaticModifier ( node ) && node . initializer ) ) {
3310
+ transformFlags |= TransformFlags . ContainsTypeScriptClassSyntax ;
3311
+ }
3312
+
3308
3313
node . transformFlags = transformFlags | TransformFlags . HasComputedFlags ;
3309
3314
return transformFlags & ~ TransformFlags . NodeExcludes ;
3310
3315
}
Original file line number Diff line number Diff line change @@ -1257,7 +1257,7 @@ namespace ts {
1257
1257
}
1258
1258
1259
1259
function substitutePropertyAccessExpression ( node : PropertyAccessExpression ) {
1260
- if ( node . expression . kind === SyntaxKind . SuperKeyword ) {
1260
+ if ( enclosingSuperContainerFlags && node . expression . kind === SyntaxKind . SuperKeyword ) {
1261
1261
return setTextRange (
1262
1262
createPropertyAccess (
1263
1263
createFileLevelUniqueName ( "_super" ) ,
@@ -1269,7 +1269,7 @@ namespace ts {
1269
1269
}
1270
1270
1271
1271
function substituteElementAccessExpression ( node : ElementAccessExpression ) {
1272
- if ( node . expression . kind === SyntaxKind . SuperKeyword ) {
1272
+ if ( enclosingSuperContainerFlags && node . expression . kind === SyntaxKind . SuperKeyword ) {
1273
1273
return createSuperElementAccessInAsyncMethod (
1274
1274
node . argumentExpression ,
1275
1275
node
You can’t perform that action at this time.
0 commit comments