1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:17:44 +00:00

LibIDL: Partially implement distinguishing between interface-like types

This is needed for WebAssembly, where we need to distinguish between a
BufferSource and a WebAssembly.Module.
This commit is contained in:
Timothy Flynn 2023-03-16 12:53:55 -04:00 committed by Linus Groh
parent 1657a46ee7
commit 08fabf7acb

View file

@ -178,11 +178,9 @@ bool Type::is_distinguishable_from(IDL::Type const& other) const
auto other_distinguishability = determine_category(other_innermost_type);
if (this_distinguishability == DistinguishabilityCategory::InterfaceLike && other_distinguishability == DistinguishabilityCategory::InterfaceLike) {
// Two interface-likes are distinguishable if:
// "The two identified interface-like types are not the same, and no single platform object
// implements both interface-like types."
// FIXME: Implement this.
return false;
// The two identified interface-like types are not the same, and
// FIXME: no single platform object implements both interface-like types.
return this_innermost_type.name() != other_innermost_type.name();
}
return table[to_underlying(this_distinguishability)][to_underlying(other_distinguishability)];