-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
scala> implicitly[Manifest[List[String]]]
res15: Manifest[List[String]] = scala.collection.immutable.List[java.lang.String]
scala> implicitly[Manifest[List[Nothing]]]
res16: Manifest[List[Nothing]] = scala.collection.immutable.List[Nothing]
scala> def f[T, M[_]](x: M[T])(implicit m: Manifest[M[T]]) = m
f: [T, M[_]](x: M[T])(implicit m: Manifest[M[T]])Manifest[M[T]]
scala> f(List[String]())
res18: Manifest[List[String]] = scala.collection.immutable.List[java.lang.String]
scala> f(List[Nothing]())
<console>:33: error: No Manifest available for List[T].
f(List[Nothing]())
^I actually have all the Nothing related bugs (except this one - I assume this one too, but I haven't checked) fixed in a branch, but I'm still experimenting with variations of the approach.
Reactions are currently unavailable