我在想,为什么AnyVal不能用于isInstanceOf检查?
这种行为背后的原因是什么?
scala> val c = 't'
c: Char = t
scala> c.isInstanceOf[AnyVal]
<console>:12: error: type AnyVal cannot be used in a type pattern or isInstanceO
f test
c.isInstanceOf[AnyVal]