Why does all of these return true, while for AnyVal returns error on scala 2.x
class Demo
val d = new Demo
d.isInstanceOf[Any]
-> true
d.isInstanceOf[AnyRef]
-> true
d.isInstanceOf[AnyVal]
-> true
Why does all of these return true, while for AnyVal returns error on scala 2.x
class Demo
val d = new Demo
d.isInstanceOf[Any]
-> true
d.isInstanceOf[AnyRef]
-> true
d.isInstanceOf[AnyVal]
-> true
Copyright © 2021 Jogjafile Inc.