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

implicit ClassTag for value class alias is incorrect #7375

Closed
scabug opened this issue Apr 15, 2013 · 7 comments
Closed

implicit ClassTag for value class alias is incorrect #7375

scabug opened this issue Apr 15, 2013 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Apr 15, 2013

This can quite easily lead to ArrayStoreExceptions, as I'm sure you can imagine:

scala> class Foo(val n: Int) extends AnyVal
defined class Foo

scala> type F = Foo
defined type alias F

scala> implicitly[ClassTag[Foo]]
res0: scala.reflect.ClassTag[Foo] = Foo

scala> implicitly[ClassTag[F]]
res1: scala.reflect.ClassTag[F] = java.lang.Integer
@scabug
Copy link
Author

@scabug scabug commented Apr 15, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7375?orig=1
Reporter: Jeff Olson (jdolson)
Affected Versions: 2.10.1

@scabug
Copy link
Author

@scabug scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

1 similar comment
@scabug
Copy link
Author

@scabug scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

@scabug
Copy link
Author

@scabug scabug commented Oct 27, 2013

@retronym said:
Could you take a look at this one please, Denys?

@scabug
Copy link
Author

@scabug scabug commented Oct 28, 2013

@densh said:
Sure, I'll look into it.

@scabug
Copy link
Author

@scabug scabug commented Nov 21, 2013

@densh said:
This bug might have been accidentally fixed along the way. Neither 2.10.x nor master exhibit given problem:

scala> import scala.reflect.ClassTag
import scala.reflect.ClassTag

scala> class Foo(val n: Int) extends AnyVal
defined class Foo

scala> type F = Foo
defined type alias F

scala> println(implicitly[ClassTag[Foo]])
$line4.$read$$iw$$iw$Foo

scala> println(implicitly[ClassTag[F]])
$line4.$read$$iw$$iw$Foo

I'll submit a test case anyway.

@scabug
Copy link
Author

@scabug scabug commented Nov 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants