-
Couldn't load subscription status.
- Fork 1.1k
fix: use underlying of VCs to compute generic signature #24284
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
base: main
Are you sure you want to change the base?
Conversation
cb8ed16 to
f3d3cd8
Compare
|
(there seems to be some failed test, but how on do you find the failure in this huge log file..?) |
|
So far, one test had to be disabled on Scala.js because of reflection and the other |
|
Another error here is the following: class Box[A](val value: A) extends AnyVal
class ArrayBox[A](val value: Array[A]) extends AnyVal
class Foo:
def foo(x: Box[Int]): Box[Int] = Box(x.value)Now, |
|
Same for this method: class ArrayBox[A](val value: Array[A]) extends AnyVal
class Foo:
def foo(x: ArrayBox[Int]): ArrayBox[Int] = ArrayBox(x.value)
|
|
Probably historical. There is often not a good explanation for things involving value classes. They are full of weird non-optimal stuff. |
That is a real problem, though. We need the Java generic signature to be such that its (Java) erasure corresponds to the erased signature that we emit. |
Scala 2 seems to do the same. ASM output: With 3.7.3 I get So in the current form, this PR would align with the wrong behavior of Scala 2, IIUC? |
Have the correct generic signature generated (à la Scala 2) for value classes while at the same time preserving the fix in #20463
Closes #24276
Closes #22140