-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Generated bridge clashes with member of trait in Scala.js under Scala 3 #13127
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
This comment has been minimized.
This comment has been minimized.
Minimal example, that passes when compiled to jvm but fails with js: trait A[T]:
def doA(arg1: T): T
class B[T](val arr: Array[T]) extends AnyVal
def a[T]: A[B[T]] =
(arg1: B[T]) => null.asInstanceOf[B[T]] It is worth noting that |
I'm on mobile right now, so I can't test. But I'm pretty sure this is not directly related to Scala.js, but rather to the fact that the SAM type is not a platform SAM type. I guess it can be reproduced on the JVM by using a SAM type that is not a JVM SAM type. For example: class C
trait A[T] extends C:
// The rest as before |
In which this is likely a duplicate of #11264 |
Confirmed, so it is unrelated to js. |
Uh oh!
There was an error while loading. Please reload this page.
Scala 3.0.2-RC1 (And Scala 2.13.6)
I've attempted to minimise the code, but haven't been able to reproduce the bug in simplified code. I have therefore created a cut down repository here from my main repository with the minimum 2 modules required to produce the errors.
The code compiles for Jvm but is failing for Scala.js. There are 2 modules Util and Graphics. Util compiles under all 4 combinations of Js and jvm targets and Scala 2.13.6 and Scala 3.0.2-RC1. The graphics module fails for Scala.js on Scala 3 implicit lookup succeeds for JVM but fails for Js. In Sbt:
Expectation is that the compile phase will be the same for Jvm and Js and also what compiles for Scala 2 will compile for Scala 3.
The text was updated successfully, but these errors were encountered: