Skip to content

java generic signature for value class array is unboxed but descriptor is boxed #12189

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

Open
bishabosha opened this issue Apr 22, 2021 · 0 comments

Comments

@bishabosha
Copy link
Member

bishabosha commented Apr 22, 2021

Compiler version

3.0.0-RC2

Minimized code

package dottyErasure

trait A
class VC(val self: A) extends AnyVal
class Z {
  def vcARRAY(x: Array[VC]): Unit = {}
}

Output

public void vcARRAY(dottyErasure.A[]);
    descriptor: ([LdottyErasure/VC;)V
    flags: ACC_PUBLIC
    Code:
      stack=0, locals=2, args_size=2
         0: return
      LineNumberTable:
        line 222: 0
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0       1     0  this   LdottyErasure/Z;
            0       1     1     x   [LdottyErasure/VC;
    Signature: #217                         // ([LdottyErasure/A;)V
    MethodParameters:
      Name                           Flags
      x                              final

Expectation

the generic signature should be public void vcARRAY(dottyErasure.VC[])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants