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
ba4d867de6
commit
67a6eeb91a
@ -324,6 +324,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;
|
||||
}
|
||||
@ -764,8 +765,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