Skip to content

Unexpected erasure of type alias #5090

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
allanrenucci opened this issue Sep 8, 2018 · 0 comments
Closed

Unexpected erasure of type alias #5090

allanrenucci opened this issue Sep 8, 2018 · 0 comments

Comments

@allanrenucci
Copy link
Contributor

class TypeAlias {
  type T[X] = X
  def a(i: T[Int]): T[Int] = i
}

erases to

class TypeAlias {
  def a(i: Int): Object = scala.Int.box(i)
}

In scalac:

class TypeAlias {
  def a(i: Int): Int = i
}
allanrenucci added a commit that referenced this issue Sep 9, 2018
Fix #5090: Fix condition in erasedResult type
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

1 participant