Factor the scope stack and lexical lookups out of Check::Context. (#3688)

This commit is contained in:
Richard Smith authored and GitHub committed 2024-02-06 00:59:52 +00:00
1 parent 524902b540
commit fdfb1fb5ef
17 files changed
+416 -289

No files matched your search

+1 -1
View File
@@ -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 "