@@ -46,7 +46,7 @@ namespace ts {
46
46
/** Whether the async function contains an element access on super (`super[x]`). */
47
47
let hasSuperElementAccess : boolean ;
48
48
/** A set of node IDs for generated super accessors (variable statements). */
49
- const substitutedSuperAccessors : boolean [ ] = [ ] ;
49
+ const substitutedSuperAccessors = new Set < Node > ( ) ;
50
50
51
51
let contextFlags : ContextFlags = 0 ;
52
52
@@ -503,7 +503,7 @@ namespace ts {
503
503
enableSubstitutionForAsyncMethodsWithSuper ( ) ;
504
504
if ( capturedSuperProperties . size ) {
505
505
const variableStatement = createSuperAccessVariableStatement ( factory , resolver , node , capturedSuperProperties ) ;
506
- substitutedSuperAccessors [ getNodeId ( variableStatement ) ] = true ;
506
+ substitutedSuperAccessors . add ( variableStatement ) ;
507
507
insertStatementsAfterStandardPrologue ( statements , [ variableStatement ] ) ;
508
508
}
509
509
}
@@ -613,7 +613,7 @@ namespace ts {
613
613
}
614
614
}
615
615
// Disable substitution in the generated super accessor itself.
616
- else if ( enabledSubstitutions && substitutedSuperAccessors [ getNodeId ( node ) ] ) {
616
+ else if ( enabledSubstitutions && substitutedSuperAccessors . has ( node ) ) {
617
617
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags ;
618
618
enclosingSuperContainerFlags = 0 ;
619
619
previousOnEmitNode ( hint , node , emitCallback ) ;
0 commit comments