def foo[T, Coll[T]] = ??? ^^^ the same T def foo[T, Coll[T] <: Seq[T]] = ??? ^^^ not all the same T
@nuttycom Just thought about this some more. They're indistinguishable using only inference, but a constraint if you specify the types.
-
-
@propensive scala> foob[Int, List[Int]] <console>:9: error: List[Int] takes no type parameters, expected: one foob[Int, List[Int]]Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@propensive As expected. One *could* however use a universal type constructor here though... - End of conversation
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.