Scala中的一些特殊字符用法

<:< and <%< work similarly, but with slight variations:

  • A =:= B means A must be exactly B
  • A <:< B means A must be a subtype of B (analogous to the simple type constraint <:)
  • A <%< B means A must be viewable as B, possibly via implicit conversion (analogous to the simple type constraint <%)
posted @ 2010-08-26 16:15  evilyzou  阅读(599)  评论(0)    收藏  举报