scala> implicitly[Int <:< AnyVal]
res0: <:<[Int,AnyVal] = <function1>
scala> class Foo
defined class Foo
scala> class Bar extends Foo
defined class Bar
scala> implicitly[Foo <:< Bar]
<console>:8: error: could not find implicit value for parameter e: <:<[Foo,Bar]
implicitly[Foo <:< Bar]
^
scala> implicitly[Bar <:< Foo]
res2: <:<[Bar,Foo] = <function1>
<:<
công việc hạn chế như thế nào? Hay chính xác hơn, đâu là định nghĩa ngầm định cung cấp các cá thể của <:<
?<: <làm việc như thế nào?
thể trùng lặp của [gì <: <, <% <, và =: = có nghĩa là trong Scala 2.8 và chúng được ghi chép ở đâu?] (http://stackoverflow.com/questions/3427345/what-do-and-mean-in-scala-2-8-and-where-are -sey-documented) – oluies
http://stackoverflow.com/questions/2603003/operator-in-scala – oluies