You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@paulp said:
After looking at it I'm not sure it's a bug, or at least not sure it's not intentional. I would agree it's undesirable, and one ought to be able to retrieve type arguments without having to special case arrays. The reasoning for the current approach would be that with Arrays the type argument is "built in" to the top level manifest, so you don't actually have type arguments: i.e. Array[Int] has a first-class runtime representation, unlike List[Int]. Code like this is what shows us the author was well aware there were no type args on arrays:
I was told on the mailing list this is a bug so I'll just copy and paste from there (see below). I was using Scala 2.8.0 Final.
I was hoping to retrieve the manifest of an array's element type like so:
This returns an empty list. Looking at the Manifest.arrayManifest method, I see that it is implemented as
This explains why the above retuns Nil but it looks like implementing it as
would solve the problem.
The text was updated successfully, but these errors were encountered: