Skip to content

Commit 91722ae

Browse files
authored
Stop round tripping through an InstId to get the ConstantId of a TypeId (#6044)
TypeId and ConstantId are easily interchangeable, and there's no need to go through InstId, which is more complicated.
1 parent e8cd229 commit 91722ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toolchain/check/member_access.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static auto LookupMemberNameInScope(Context& context, SemIR::LocId loc_id,
319319
// Witness that `T` implements the `assoc_interface`.
320320
auto lookup_result = LookupImplWitness(
321321
context, loc_id,
322-
context.constant_values().Get(base_as_type.inst_id),
322+
context.types().GetConstantId(base_as_type.type_id),
323323
EvalOrAddInst(
324324
context, loc_id,
325325
FacetTypeFromInterface(context, assoc_interface.interface_id,

0 commit comments

Comments
 (0)