From b2f4af4d4f58181d702a60f57123968adac4c242 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 24 Sep 2019 09:16:47 -0700 Subject: [PATCH] Fix that works with both LKG and built compilers --- src/compiler/checker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index eedf8bf7d86..c0f06058f4d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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)); }