mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 19:21:13 +01:00
Factor the scope stack and lexical lookups out of Check::Context. (#3688)
This commit is contained in:
@@ -91,7 +91,7 @@ auto CheckReturnedVar(Context& context, Parse::NodeId returned_node,
|
||||
}
|
||||
|
||||
auto RegisterReturnedVar(Context& context, SemIR::InstId bind_id) -> void {
|
||||
auto existing_id = context.SetReturnedVarOrGetExisting(bind_id);
|
||||
auto existing_id = context.scope_stack().SetReturnedVarOrGetExisting(bind_id);
|
||||
if (existing_id.is_valid()) {
|
||||
CARBON_DIAGNOSTIC(ReturnedVarShadowed, Error,
|
||||
"Cannot declare a `returned var` in the scope of "
|
||||
|
||||
Reference in New Issue
Block a user