Fixed bug where type analysis pass wasn't being reset back to 1 when markReanalysisRequired was called, so we would sometimes hit the max analysis limit.

This commit is contained in:
Eric Traut 2019-10-20 02:21:25 -07:00
parent 204b452816
commit aa51a7f547

View File

@ -331,6 +331,7 @@ export class SourceFile {
markReanalysisRequired(): void {
// Keep the parse info, but reset the analysis to the beginning.
this._parseTreeNeedsCleaning = true;
this._typeAnalysisPassNumber = 1;
this._isTypeAnalysisFinalized = false;
this._isTypeAnalysisPassNeeded = true;
@ -789,8 +790,7 @@ export class SourceFile {
private _cleanParseTreeIfRequired() {
if (this._parseResults) {
if (this._parseTreeNeedsCleaning) {
const cleanerWalker = new ParseTreeCleanerWalker(
this._parseResults.parseTree);
const cleanerWalker = new ParseTreeCleanerWalker(this._parseResults.parseTree);
cleanerWalker.clean();
this._parseTreeNeedsCleaning = false;
}