scala Weak Conformance

Weak Conformance
In some situations Scala uses a more general conformance relation. A type S weakly conforms to a type T, written S<:wT, if S<:T or both S and T are primitive number types and S precedes T in the following ordering.

Byte  <:w Short
Short <:w Int
Char  <:w Int
Int   <:w Long
Long  <:w Float
Float <:w Double

A weak least upper bound is a least upper bound with respect to weak conformance.

SCALA-DOC-TYPES

原文地址:https://www.cnblogs.com/suanec/p/10139882.html