Skip to content

Array[_ <: Foo] where Foo is a universal trait should be erased to Object #540

@smarter

Description

@smarter

Currently, it's erased to Array[Foo]:

trait Foo extends Any

object Univ {
  def univ[T <: Foo](x: Array[T]) = {}
  def univ2(x: Array[_ <: Foo]) = {}
}

In scalac it was erased to Object, I don't know why. In Dotty we need to erase it to Object if we want a different representation for arrays of value classes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions