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
The AnnotatedType seems not working with ExistentialType in the runtime reflection #10016
Comments
Imported From: https://issues.scala-lang.org/browse/SI-10016?orig=1 |
@SethTisue said: If you become confident this is a bug, it would helpful to have more minimal reproduction. For example, I assume the SerialVersionUID stuff is irrelevant — or is it? What is the minimum code necessary to demonstrate the issue? |
miao qian (noddle) said (edited on Nov 15, 2016 6:06:38 AM UTC): scala> class TraceTypeParameters extends scala.annotation.Annotation
defined class TraceTypeParameters
scala> class B[T]
defined class B
scala> val b = new B[Int] {def x = 1}
b: B[Int]{def x: Int} = $anon$1@45658133
scala> b: (B[_])@TraceTypeParameters
res0: B[_] = $anon$1@45658133
The res0 losts associated annotation info. |
miao qian (noddle) said: scala> b: (B[_]{def x: Int})@TraceTypeParameters
res1: B[_]{def x: Int} @TraceTypeParameters = $anon$1@45658133
scala> b: (B[Int])@TraceTypeParameters
res2: B[Int] @TraceTypeParameters = $anon$1@45658133
|
miao qian (noddle) said: |
miao qian (noddle) said: |
@SethTisue said: scala> import scala.language.existentials
import scala.language.existentials
scala> b: (B[_])@TraceTypeParameters
res1: B[_$1] @TraceTypeParameters forSome { type _$1 } = $anon$1@2957fcb0 re: line 211, I'm not sure what line you mean of what file — can you link to it on GitHub? |
miao qian (noddle) said (edited on Dec 22, 2016 9:43:14 AM UTC): |
@adriaanm said: |
@adriaanm said: |
Copied from scala#5613, credit goes to @adriaanm
Copied from scala#5613, credit goes to @adriaanm
sample code snippet:
The output is:
IMO the second line in the output should be
AnnotatedType
as same as the 1st line, doesn't it?May i missed something?
The text was updated successfully, but these errors were encountered: