Commit 33c335e
committed
Fix #13518: Scala.js: fix primitive + string when the string is 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_+`.1 parent ea871c2 commit 33c335e
File tree
2 files changed
+9
-21
lines changed- compiler/src/dotty/tools/backend/sjs
- tests/sjs-junit/test/org/scalajs/testsuite/compiler
2 files changed
+9
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2790 | 2790 | | |
2791 | 2791 | | |
2792 | 2792 | | |
2793 | | - | |
2794 | | - | |
2795 | | - | |
2796 | | - | |
2797 | | - | |
2798 | | - | |
2799 | | - | |
2800 | | - | |
2801 | | - | |
2802 | | - | |
2803 | | - | |
2804 | | - | |
2805 | | - | |
2806 | | - | |
2807 | | - | |
2808 | | - | |
2809 | | - | |
2810 | | - | |
2811 | | - | |
2812 | | - | |
2813 | | - | |
| 2793 | + | |
2814 | 2794 | | |
2815 | 2795 | | |
2816 | 2796 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
0 commit comments