Skip to content

non-uniform treatment of Nothing continues to bother #5505

@scabug

Description

@scabug
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions