From f0fd1d23424f9980ff4da7b2b294f0ac6f6b6c6b Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 7 Aug 2024 09:21:40 -0700 Subject: [PATCH] Clean up: use across-decl comparison comparing interface. (#4195) This doesn't seem to be observable because we don't support parameterized impls. But it's consistent with how we compare the type portion of the impl. --- toolchain/check/member_access.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchain/check/member_access.cpp b/toolchain/check/member_access.cpp index abcc2c27cfd0..aebe729b2627 100644 --- a/toolchain/check/member_access.cpp +++ b/toolchain/check/member_access.cpp @@ -138,7 +138,8 @@ static auto LookupInterfaceWitness(Context& context, context.types().GetConstantId(impl.self_id), type_const_id)) { continue; } - if (impl.constraint_id != interface_type_id) { + if (!context.types().AreEqualAcrossDeclarations(impl.constraint_id, + interface_type_id)) { // TODO: An impl of a constraint type should be treated as implementing // the constraint's interfaces. continue;