From 8d028c529144bf2a2be3dfdbec18f39a23437ff2 Mon Sep 17 00:00:00 2001 From: york yao Date: Thu, 15 Sep 2016 10:04:00 +0800 Subject: [PATCH] fix error --- src/compiler/checker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f0382b0a6ee3a..2fbec7cf99ae7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14237,7 +14237,7 @@ namespace ts { } function checkGrammarStaticPropertyOrMethodName(node: ClassElement) { - if (node.flags & NodeFlags.Static) { + if (node.flags & ModifierFlags.Static) { if (node.kind === SyntaxKind.PropertyDeclaration) { return checkGrammarStaticMemberName(node, ((node as ClassElement).name as Identifier).text); } @@ -14256,9 +14256,9 @@ namespace ts { const forbiddenNames = ["length", "name", "arguments", "caller"]; if (forbiddenNames.indexOf(name) !== -1) { if (languageVersion < ScriptTarget.ES6) { - return grammarErrorOnNode(node, Diagnostics._0_is_not_allowed_to_be_used_as_a_name_of_a_static_property_or_method_in_a_class_for_target_es5_2696, name); + return grammarErrorOnNode(node, Diagnostics._0_is_not_allowed_to_be_used_as_a_name_of_a_static_property_or_method_in_a_class_for_target_ES5, name); } else { - return grammarErrorOnNode(node, Diagnostics._0_is_not_allowed_to_be_used_as_a_name_of_a_static_property_in_a_class_for_target_es6_and_higher_2697, name); + return grammarErrorOnNode(node, Diagnostics._0_is_not_allowed_to_be_used_as_a_name_of_a_static_property_in_a_class_for_target_ES6_and_higher, name); } } @@ -19746,7 +19746,7 @@ namespace ts { if (computedPropertyName.expression.kind === SyntaxKind.StringLiteral) { const member = computedPropertyName.parent.parent.parent; - if (member.flags & NodeFlags.Static && member.kind === SyntaxKind.PropertyDeclaration) { + if (member.flags & ModifierFlags.Static && member.kind === SyntaxKind.PropertyDeclaration) { return checkGrammarStaticMemberName(computedPropertyName, (computedPropertyName.expression as StringLiteral).text); } }