0

When I try to do this, it works fine

  val list = List(1,2,3,4,5)

  val array = list.toArray

But I am trying to understand the implicits that happen behind the scenes. The signature of toArray is

[B >: Int](implicit evidence$1 : classTag[B])

Any explanation on what's happening would be good to know.

Srinivas
  • 2,010
  • 7
  • 26
  • 51
  • 2
    https://stackoverflow.com/questions/26919214/why-do-arrays-require-classtags-but-collections-like-list-do-not – Seth Tisue Jun 28 '18 at 18:41
  • Possible duplicate of [Why do Arrays require ClassTags but collections like List do not?](https://stackoverflow.com/questions/26919214/why-do-arrays-require-classtags-but-collections-like-list-do-not) – Andrey Tyukin Jun 28 '18 at 21:54

0 Answers0