Skip to content
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

Wrong erasure of parametric value classes #405

Closed
sjrd opened this issue Nov 29, 2023 · 0 comments
Closed

Wrong erasure of parametric value classes #405

sjrd opened this issue Nov 29, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sjrd
Copy link
Contributor

sjrd commented Nov 29, 2023

package example

class Value[T](v: T) extends AnyVal

class C[T <: Int]:
  def m(x: Value[T]): Unit = ???

ErasedTypeRef.erase on the type of x returns Object instead of Int

Originally posted by @adpi2 in #403 (comment)

@sjrd sjrd self-assigned this Nov 29, 2023
@sjrd sjrd added the bug Something isn't working label Nov 29, 2023
sjrd added a commit to sjrd/tasty-query that referenced this issue Nov 30, 2023
Including when they contain arrays or are contained in arrays.
sjrd added a commit to sjrd/tasty-query that referenced this issue Nov 30, 2023
Including when they contain arrays or are contained in arrays.
sjrd added a commit to sjrd/tasty-query that referenced this issue Nov 30, 2023
Including when they contain arrays or are contained in arrays.
sjrd added a commit to sjrd/tasty-query that referenced this issue Nov 30, 2023
Including when they contain arrays or are contained in arrays.
sjrd added a commit to sjrd/tasty-query that referenced this issue Nov 30, 2023
Including when they contain arrays or are contained in arrays.
@sjrd sjrd closed this as completed in 912dabe Dec 1, 2023
sjrd added a commit that referenced this issue Dec 1, 2023
Fix #405: Completely overhaul erasure of value classes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant