Skip to content

Commit 3b9bbb3

Browse files
author
Andy
authored
Remove duplicate assignment (#18994)
1 parent 7a4c331 commit 3b9bbb3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18451,9 +18451,8 @@ namespace ts {
1845118451
checkGrammarDecorators(node) || checkGrammarModifiers(node);
1845218452

1845318453
checkVariableLikeDeclaration(node);
18454-
let func = getContainingFunction(node);
18454+
const func = getContainingFunction(node);
1845518455
if (hasModifier(node, ModifierFlags.ParameterPropertyModifier)) {
18456-
func = getContainingFunction(node);
1845718456
if (!(func.kind === SyntaxKind.Constructor && nodeIsPresent(func.body))) {
1845818457
error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
1845918458
}

0 commit comments

Comments
 (0)