Fix that works with both LKG and built compilers

This commit is contained in:
Anders Hejlsberg
2019-09-24 09:16:47 -07:00
parent f0bf72fe34
commit b2f4af4d4f

View File

@@ -33378,7 +33378,8 @@ namespace ts {
// Modifiers are never allowed on properties except for 'async' on a method declaration
if (prop.modifiers) {
for (const mod of prop.modifiers) {
const modifiers = prop.modifiers;
for (const mod of modifiers) {
if (mod.kind !== SyntaxKind.AsyncKeyword || prop.kind !== SyntaxKind.MethodDeclaration) {
grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod));
}