TS: Fix skewed arrays due to recursive call

This commit is contained in:
Asger F
2019-09-02 13:03:25 +01:00
parent 6d55d1f7c0
commit e9159acecb

View File

@@ -974,8 +974,10 @@ export class TypeTable {
if (superType == null) continue;
let baseTypeSymbol = superType.symbol;
if (baseTypeSymbol == null) continue;
let baseId = this.getSymbolId(baseTypeSymbol);
// Note: take care not to perform a recursive call between the two `push` calls.
this.baseTypes.symbols.push(symbolId);
this.baseTypes.baseTypeSymbols.push(this.getSymbolId(baseTypeSymbol));
this.baseTypes.baseTypeSymbols.push(baseId);
}
}
}