Last active
December 22, 2015 11:48
-
-
Save nuttycom/6467809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> def foo[T, Coll[T] <: Seq[T]] = ??? | |
warning: there were 1 feature warning(s); re-run with -feature for details | |
foo: [T, Coll[T] <: Seq[T]]=> Nothing | |
scala> foo[Int, List[Int]] | |
<console>:9: error: List[Int] takes no type parameters, expected: one | |
foo[Int, List[Int]] | |
^ | |
scala> type LA[A] = List[Int] | |
defined type alias LA | |
scala> foo[Int, LA] | |
<console>:10: error: type arguments [Int,LA] do not conform to method foo's type parameter bounds [T,Coll[T] <: Seq[T]] | |
foo[Int, LA] | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment