Skip to content

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

Open
@bishabosha

Description

@bishabosha

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[])

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions