Commit 2f60265
Fix #15494: Handle non-specialized functions in EtaReduce.
In Scala.js, function specialization is disabled. This means that
non-specialized functions can reach `EtaReduce`. Previously, it
did not handle the shape of right-hand-side for non-specialized
functions returning primitives. We fix the issue by handling those,
like we already handled `.asInstanceOf`s.1 parent 16f5c25 commit 2f60265
File tree
2 files changed
+23
-0
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/sjs-junit/test/org/scalajs/testsuite/compiler
2 files changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
| |||
0 commit comments