IDLGenerators: Generate impl_from() for types that have setlike

Found by this interface, which has nothing else in it:

```
[Exposed=Window]
interface CustomStateSet {
  setlike<DOMString>;
};
```
This commit is contained in:
Sam Atkins 2025-07-03 17:19:12 +01:00 committed by Tim Ledbetter
commit be21d952b1
Notes: github-actions[bot] 2025-07-04 17:12:08 +00:00

View file

@ -3742,7 +3742,7 @@ static void generate_prototype_or_global_mixin_definitions(IDL::Interface const&
generator.set("iterator_name", ByteString::formatted("{}Iterator", interface.name));
}
if (!interface.attributes.is_empty() || !interface.functions.is_empty() || interface.has_stringifier) {
if (!interface.attributes.is_empty() || !interface.functions.is_empty() || interface.has_stringifier || interface.set_entry_type.has_value()) {
generator.append(R"~~~(
[[maybe_unused]] static JS::ThrowCompletionOr<@fully_qualified_name@*> impl_from(JS::VM& vm)
{