scala Weak Conformance

Posted suanec

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

以上是关于scala Weak Conformance的主要内容,如果未能解决你的问题,请参考以下文章

新车简报 | 斯柯达Scala

OC对象之旅 weak弱引用实现分析

为啥这个悬空的 std::weak_ptr 不会导致 SEGFAULT? [复制]

(iOS) __block和__weak认识

为啥通过weak_ptr调用这么慢?

Objective-C基础之_ weak, _ strong , __ block