Ok, without checking, what do you think happens? (List(0): Seq[Int]) match { case _: List[Int] => 1 case _ => 2 }
-
-
I don't know if there is a difference between repl and sbt/scala project. But if you open a scala project in say IntelliJ and browse to definition on a Seq you can see that it points to the mutable version. Not sure but could repl br using a different predef?
-
If `collection.mutable._` were imported, that would do it... but I doubt that's where the idea came from. Note that mutable.Seq[T] <:< Seq[T] which means that you can pass a mutable sequence to a method which requests an immutable one. Could that be the source of confusion?
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.