I am creating a MultiMap
val ms = new collection.mutable.HashMap[String, collection.mutable.Set[String]]() with collection.mutable.MultiMap[String, String]
which, after filling with records, should be passed to a function waiting for Map[String, Set[String]] . toMap transfer does not work directly and tries to convert it to an immutable card via toMap
ms.toMap[String, Set[String]]
gives
Cannot prove that (String, scala.collection.mutable.Set[String]) <:< (String, Set[String]).
Can this be solved without manually repeating in ms and inserting all the records into a new immutable card?
source share