This repository was archived by the owner on Feb 20, 2019. It is now read-only.
This repository was archived by the owner on Feb 20, 2019. It is now read-only.
FastTypeTag doesn't work for types with type parameters #417
Open
Description
I wonder why this happens:
case class Map[T, S]( ... )
val tag = implicitly[FastTypeTag[Map[List[Int], List[String]]]]
println(tag) // shows Map[t,s] where t,s are type variables
When using AnyUnpickler
one wants to unpickle anything inferred from its type. In this case, reflection fails to create an unpickler for that type because t
and s
are unknown. Why aren't t
and s
concrete when they could be List[Int]
and List[String]
? Is this a bug? Otherwise, why doesn't FastTypeTag
constructs the tag from the full type?
/cc @jsuereth since he's been refactoring FastTypeTag
lately.