diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 490b1ae9182..6f81b879885 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8861,6 +8861,11 @@ module ts { } function checkExportAssignment(node: ExportAssignment) { + // Grammar checking + if (node.flags & NodeFlags.Modifier) { + grammarErrorOnFirstToken(node, Diagnostics.An_export_assignment_cannot_have_modifiers); + } + var container = node.parent; if (container.kind !== SyntaxKind.SourceFile) { // In a module, the immediate parent will be a block, so climb up one more parent diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a26d928bf1c..2aacbe5ab04 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4642,7 +4642,7 @@ module ts { case SyntaxKind.Constructor: return checkConstructor(node); //case SyntaxKind.DeleteExpression: return checkDeleteExpression( node); //case SyntaxKind.ElementAccessExpression: return checkElementAccessExpression(node); - case SyntaxKind.ExportAssignment: return checkExportAssignment(node); + //case SyntaxKind.ExportAssignment: return checkExportAssignment(node); case SyntaxKind.ExternalModuleReference: return checkExternalModuleReference(node); case SyntaxKind.ForInStatement: return checkForInStatement(node); case SyntaxKind.ForStatement: return checkForStatement(node);