Skip to content

Commit 48ae5ea

Browse files
author
Yui T
committed
Remove check if node is a block
1 parent f682980 commit 48ae5ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11446,7 +11446,7 @@ namespace ts {
1144611446

1144711447
function checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node: Node) {
1144811448
if (node.modifiers) {
11449-
if (inBlockOrObjectLiteralExpression(node)) {
11449+
if (inObjectLiteralExpression(node)) {
1145011450
if (isAsyncFunctionLike(node)) {
1145111451
if (node.modifiers.length > 1) {
1145211452
return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here);
@@ -11459,9 +11459,9 @@ namespace ts {
1145911459
}
1146011460
}
1146111461

11462-
function inBlockOrObjectLiteralExpression(node: Node) {
11462+
function inObjectLiteralExpression(node: Node) {
1146311463
while (node) {
11464-
if (node.kind === SyntaxKind.Block || node.kind === SyntaxKind.ObjectLiteralExpression) {
11464+
if (node.kind === SyntaxKind.ObjectLiteralExpression) {
1146511465
return true;
1146611466
}
1146711467

0 commit comments

Comments
 (0)