使用视图绑定。
Welcome to Scala version 2.8.0.final (Java HotSpot(TM) Client VM, Java 1.6.0_21).Type in expressions to have them evaluated.Type :help for more information.scala> class Foo[T <% Comparable[T]](val x : T)defined class Fooscala> new Foo(3)res0: Foo[Int] = Foo@9aca82


![为什么绑定参数T <:Comparable [T]的类型参数对于T = Int失败? 为什么绑定参数T <:Comparable [T]的类型参数对于T = Int失败?](http://www.mshxw.com/aiimages/31/570817.png)
