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.
This commit is contained in:
Richard Smith
2024-08-07 16:21:40 +00:00
committed by GitHub
parent 2a06c964b5
commit f0fd1d2342
+2 -1
View File
@@ -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;