Skip to content

Commit 8bd6e97

Browse files
committed
Restore in_annotation flag before propagating error
1 parent 8b61e74 commit 8bd6e97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/codegen/src/symboltable.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,8 +1479,9 @@ impl SymbolTableBuilder {
14791479
// (yield, await, named) even for non-simple targets.
14801480
let was_in_annotation = self.in_annotation;
14811481
self.in_annotation = true;
1482-
self.scan_expression(annotation, ExpressionContext::Load)?;
1482+
let result = self.scan_expression(annotation, ExpressionContext::Load);
14831483
self.in_annotation = was_in_annotation;
1484+
result?;
14841485
}
14851486
if let Some(value) = value {
14861487
self.scan_expression(value, ExpressionContext::Load)?;

0 commit comments

Comments
 (0)