Skip to content

Commit 6f667f1

Browse files
committed
Added debug assertions
1 parent 125ec82 commit 6f667f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Nodejs/Product/Analysis/Analysis/Analyzer/AnalysisUnit.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ internal void Analyze(DDG ddg, CancellationToken cancel) {
193193
internal virtual void AnalyzeWorker(DDG ddg, CancellationToken cancel) {
194194
Debug.Assert(Ast != null, "Ast has unexpected null value");
195195
Debug.Assert(ProjectEntry != null, "ProjectEntry has unexpected null value");
196+
Debug.Assert(DeclaringModuleEnvironment != null, "DeclaringModuleEnvironment has unexpected null value");
197+
Debug.Assert(DeclaringModuleEnvironment.GlobalEnvironment != null, "DeclaringModuleEnvironment.GlobalEnvironment has unexpected null value");
196198

197199
if (Ast == null || ProjectEntry == null || Tree != ProjectEntry.Tree || DeclaringModuleEnvironment == null) {
198200
// analysis unit properties are invalid or we were enqueued and a new version became available

0 commit comments

Comments
 (0)