diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 15e08842e76..7f614494e3b 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1006,11 +1006,10 @@ namespace ts { return; } // pass through - let isConstInvalid = true; case SyntaxKind.VariableStatement: // Check modifiers if (nodes === (parent).modifiers) { - return checkModifiers(>nodes, !isConstInvalid); + return checkModifiers(>nodes, parent.kind === SyntaxKind.VariableStatement); } break; case SyntaxKind.PropertyDeclaration: