mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 15:21:04 +01:00
Refactor name lookup logic out of Context (#4930)
This is a pretty straight move of name lookup functionality to name_lookup.*
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/check/handle.h"
|
||||
#include "toolchain/check/interface.h"
|
||||
#include "toolchain/check/name_lookup.h"
|
||||
#include "toolchain/check/return.h"
|
||||
#include "toolchain/check/subpattern.h"
|
||||
#include "toolchain/check/type_completion.h"
|
||||
@@ -226,7 +227,7 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
|
||||
break;
|
||||
}
|
||||
if (had_error) {
|
||||
context.AddNameToLookup(name_id, SemIR::ErrorInst::SingletonInstId);
|
||||
AddNameToLookup(context, name_id, SemIR::ErrorInst::SingletonInstId);
|
||||
// Replace the parameter with `ErrorInst` so that we don't try
|
||||
// constructing a generic based on it.
|
||||
param_pattern_id = SemIR::ErrorInst::SingletonInstId;
|
||||
|
||||
Reference in New Issue
Block a user