Skip to content

Avoid generating broken code when the object type is in a union#231

Closed
ExE-Boss wants to merge 1 commit intojsdom:mainfrom
ExE-Boss:fix/type-conversion/object-in-union
Closed

Avoid generating broken code when the object type is in a union#231
ExE-Boss wants to merge 1 commit intojsdom:mainfrom
ExE-Boss:fix/type-conversion/object-in-union

Conversation

@ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Nov 26, 2020

WebIDL2JS currently crashes when the object type is in a union, this fixes that.

Depends on:

undefined overloadsBooleanOrNumeric(boolean arg1);
undefined overloadsBooleanOrNumeric(long arg1);

// ## Avoid regressions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the present bug has to do with union types? Is overloading affected by the bug as well?

I'd also prefer a more surgical test suite. The snapshot generated from this file is really huge and not reviewable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is overloading affected by the bug as well?

The current version isn’t, because overloads had the bug fixed at some point.

@MattiasBuelens
Copy link
Contributor

I solved this in a different way in #276, see 777c9aa.

MattiasBuelens added a commit to MattiasBuelens/webidl2js that referenced this pull request Sep 28, 2025
Fixes the crash reported in jsdom#231.
MattiasBuelens added a commit to MattiasBuelens/webidl2js that referenced this pull request Sep 28, 2025
This also fixes the crash reported in jsdom#231.
MattiasBuelens added a commit to MattiasBuelens/webidl2js that referenced this pull request Sep 28, 2025
This also fixes the crash reported in jsdom#231.
domenic pushed a commit that referenced this pull request Sep 29, 2025
This also fixes the crash reported in #231.
@domenic
Copy link
Member

domenic commented Sep 29, 2025

Fixed in a different way as part of #276.

@domenic domenic closed this Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants