首页 > 其他 > 详细

scala Weak Conformance

时间:2018-12-18 20:47:59      阅读:151      评论:0      收藏:0      [点我收藏+]

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

scala Weak Conformance

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!