mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 16:06:39 +03:00
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:
parent
204b452816
commit
aa51a7f547
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user