|
Alrighty, I'm trying to gently caress around with generics and reflection, via TypeTag, to try and retain type information on runtime: http://pastebin.com/Cj6z2Ez4 (It's best to download this file and feed it into the 'scala' command. If you copy and paste it into the REPL, it behaves differently.. I'm on 2.11.8) As commented, line 11 loses type information because of the generic type declaration in line 6. If I remove that declaration everything works as expected, but for various reasons, let's say that I have to have it there and that I can't manually declare types on line 11 (because realistically, I wouldn't know what kinda of type I'd be getting.) Is there some way for me to use the underscore/wildcard type in conjunction with TypeTag to keep the type information down that chain of calls? krnhotwings fucked around with this message at 06:21 on Aug 25, 2016 |
# ¿ Aug 25, 2016 06:10 |
|
|
# ¿ May 12, 2024 03:48 |