test module reuse

This commit is contained in:
Arthur Ozga
2017-04-20 18:55:15 -07:00
parent 7966c08cc4
commit 0ea1b82a85
6 changed files with 118 additions and 92 deletions

View File

@@ -552,7 +552,7 @@ namespace ts.server {
// bump up the version if
// - oldProgram is not set - this is a first time updateGraph is called
// - newProgram is different from the old program and structure of the old program was not reused.
if (!oldProgram || (this.program !== oldProgram && !oldProgram.structureIsReused)) {
if (!oldProgram || (this.program !== oldProgram && !(oldProgram.structureIsReused & StructureIsReused.Completely))) {
hasChanges = true;
if (oldProgram) {
for (const f of oldProgram.getSourceFiles()) {