mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 18:51:09 +01:00
Emit VarStorages eagerly (#7468)
We used to have to batch these at the end of pattern traversal in order to avoid accidentally adding them to a block that was speculatively pushed for an expression within a pattern, but that's no longer a concern with the more precise handling of those speculative blocks in #7445.
This commit is contained in:
@@ -211,10 +211,6 @@ auto HandleParseNode(Context& context, Parse::ForHeaderId node_id) -> bool {
|
||||
// should be in scope.
|
||||
context.full_pattern_stack().EndPatternInitializer();
|
||||
|
||||
// Create storage for var patterns now.
|
||||
context.full_pattern_stack().BuildLocalVarStorage(context,
|
||||
/*is_returned_var=*/false);
|
||||
|
||||
// Initialize the pattern from `<element>.Get()`.
|
||||
auto element_value_id =
|
||||
CallOptionalAccessor(context, node_id, element_id, CoreIdentifier::Get);
|
||||
|
||||
Reference in New Issue
Block a user