@@ -12016,7 +12016,7 @@ module ts {
12016
12016
function isReservedWordInStrictMode(node: Identifier): boolean {
12017
12017
// Check that originalKeywordKind is less than LastFutureReservedWord to see if an Identifier is a strict-mode reserved word
12018
12018
return (node.parserContextFlags & ParserContextFlags.StrictMode) &&
12019
- (node.originalKeywordKind >= SyntaxKind.FirstFutureReservedWord && node.originalKeywordKind <= SyntaxKind.LastFutureReservedWord);
12019
+ (SyntaxKind.FirstFutureReservedWord <= node.originalKeywordKind && node.originalKeywordKind <= SyntaxKind.LastFutureReservedWord);
12020
12020
}
12021
12021
12022
12022
function reportStrictModeGrammarErrorInClassDeclaration(identifier: Identifier, message: DiagnosticMessage, arg0?: any, arg1?: any, arg2?: any): boolean {
@@ -12036,7 +12036,7 @@ module ts {
12036
12036
let nameBindings = impotClause.namedBindings;
12037
12037
if (nameBindings.kind === SyntaxKind.NamespaceImport) {
12038
12038
let name = <Identifier>(<NamespaceImport>nameBindings).name;
12039
- if (name.originalKeywordKind ) {
12039
+ if (isReservedWordInStrictMode( name) ) {
12040
12040
let nameText = declarationNameToString(name);
12041
12041
return grammarErrorOnNode(name, Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
12042
12042
}
@@ -12045,7 +12045,7 @@ module ts {
12045
12045
let reportError = false;
12046
12046
for (let element of (<NamedImports>nameBindings).elements) {
12047
12047
let name = element.name;
12048
- if (name.originalKeywordKind ) {
12048
+ if (isReservedWordInStrictMode( name) ) {
12049
12049
let nameText = declarationNameToString(name);
12050
12050
reportError = reportError || grammarErrorOnNode(name, Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText);
12051
12051
}
0 commit comments