From 1b8bfc832a7c4eaef305481fd9f2110c7c96647d Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 9 Nov 2018 17:13:39 -0800 Subject: [PATCH] Check modifiers on variable like declarations only --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b78490b4c94..ea596c2ac2c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -25111,7 +25111,7 @@ namespace ts { } } if (symbol.declarations.length > 1) { - if (some(symbol.declarations, d => d !== node && !areDeclarationFlagsIdentical(d, node))) { + if (some(symbol.declarations, d => d !== node && isVariableLike(d) && !areDeclarationFlagsIdentical(d, node))) { error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); } }