Can someone point me at what I should be doing under scala 2.10 in place of this deprecated type witness on Manifest?
reflect.ClassManifest.singleType(foo) <:< barManifest
Honestly, my goal here is just to replace it with something that doesn’t raise a deprecation warning. I’m happy to use the new reflection API.
Here’s the code in question in context, if that’s important:
If you want a fairly literal translation from manifests to type tags, you’ll need to get the appropriate mirror, use it to reflect your instance, and then use the
<:<onType. For example:And now:
There may be ways you could take advantage of the new Reflection API more fully in your application, but this should work and will take care of the deprecation warnings.