We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NameId
1 parent 3bd7252 commit 7c01bb4Copy full SHA for 7c01bb4
toolchain/check/decl_name_stack.h
@@ -122,8 +122,13 @@ class DeclNameStack {
122
// Returns the name_id for a new instruction. This is `None` when the name
123
// resolved.
124
auto name_id_for_new_inst() -> SemIR::NameId {
125
- return state == State::Unresolved ? unresolved_name_id
126
- : SemIR::NameId::None;
+ switch (state) {
+ case State::Unresolved:
127
+ case State::Poisoned:
128
+ return unresolved_name_id;
129
+ default:
130
+ return SemIR::NameId::None;
131
+ }
132
}
133
134
// The current scope when this name began. This is the scope that we will
0 commit comments