mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user