-
Notifications
You must be signed in to change notification settings - Fork 1.1k
i14623.scala
fails on Scala.js as of 3.1.3
#15494
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
Comments
Thanks for tracking that down! |
I started digging into this. It happens because I can reproduce the issue on Scala/JVM if I disable the |
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.
…ed-funs 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.
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.
Compiler version
3.1.3
Minimized code
https://github.com/lampepfl/dotty/blob/75d8eea1e943bbd2c605d8411c2d52d69974d6f3/tests/run/i14623.scala#L1-L15
Output
Expectation
It works in 3.1.2:
And in JVM for 3.1.3:
The text was updated successfully, but these errors were encountered: