Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #18658: Handle varargs of generic types in JSExportsGen. #18659

Merged

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Oct 6, 2023

When extracting the type of a varargs parameter, we have to go back to before erasure. However, that gives us a non-erased type inside as well. We need to re-erase that type to get something sensible for the back-end.

Copy link
Contributor

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

}

@Test
def overloadWithVarargOfGenericValueClass(): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also test opaque-type aliases.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

@nicolasstucki nicolasstucki assigned sjrd and unassigned nicolasstucki Oct 12, 2023
When extracting the type of a varargs parameter, we have to go back
to before erasure. However, that gives us a non-erased type inside
as well. We need to re-erase that type to get something sensible
for the back-end.
@sjrd sjrd force-pushed the sjs-exported-varargs-of-generic-type branch from 7668cf0 to 4538875 Compare October 12, 2023 07:57
@sjrd sjrd assigned nicolasstucki and unassigned sjrd Oct 12, 2023
@nicolasstucki nicolasstucki merged commit 55c5864 into scala:main Oct 16, 2023
18 checks passed
@nicolasstucki nicolasstucki deleted the sjs-exported-varargs-of-generic-type branch October 16, 2023 08:50
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 22, 2024
…n`." to LTS (#20713)

Backports #18659 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

Compiler crashes on overloaded methods with varargs of generic types on JS classes
3 participants