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 #13518: Scala.js: fix primitive + string when the string is a TermRef. #13537

Merged
merged 1 commit into from Sep 16, 2021

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Sep 15, 2021

Sometimes, the argument string's tpe can be a TermRef, in which case it is not directly a ref to StringClass. That was triggering the assertion.

The assertions and the calls to makePrimitiveBox have actually not been needed for a long time. The IR supports the arguments to a String_+ operator to be of any type. So we fix the issue by removing all of that and directly emitting the String_+.

…a TermRef.

Sometimes, the argument string's `tpe` can be a `TermRef`, in which
case it is not directly a ref to `StringClass`. That was triggering
the assertion.

The assertions and the calls to `makePrimitiveBox` have actually
not been needed for a long time. The IR supports the arguments to a
`String_+` operator to be of any type. So we fix the issue by
removing all of that and directly emitting the `String_+`.
@sjrd sjrd merged commit e9fb094 into scala:master Sep 16, 2021
@sjrd sjrd deleted the sjs-fix-prim-plus-string branch September 16, 2021 06:55
@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
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.

None yet

3 participants