Skip to content

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

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

Closed
smarter opened this issue May 5, 2015 · 0 comments
Closed

Comments

@smarter
Copy link
Member

smarter commented May 5, 2015

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

@odersky odersky closed this as completed in d26604f May 8, 2015
DarkDimius added a commit that referenced this issue May 8, 2015
…-array

Fix #540 - unbounded array test for wildcard array arguments
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