perf(semantic): simplify resetting ReferenceFlags in AssignmentExpression (#5846)

This commit is contained in:
Dunqing committed 2024-09-21 04:13:23 +00:00
1 parent 15743344b1
commit c3e0fb68c5
1 file changed
+1 -8
+1 -8
View File
@@ -2003,14 +2003,7 @@ impl<'a> SemanticBuilder<'a> {
}
self.current_reference_flags -= ReferenceFlags::Write;
}
AstKind::AssignmentExpression(expr) => {
if expr.operator != AssignmentOperator::Assign
|| self.is_not_expression_statement_parent()
{
self.current_reference_flags -= ReferenceFlags::Read;
}
}
AstKind::ExportNamedDeclaration(_)
AstKind::AssignmentExpression(_) | AstKind::ExportNamedDeclaration(_)
| AstKind::TSTypeQuery(_)
// Clear the reference flags that are set in AstKind::PropertySignature
| AstKind::PropertyKey(_) => {