Closed
Description
Should we disallow type Null
in a type pattern or isInstanceOf
test like scalac does to avoid surprising behaviors?
Dotty:
scala> null.isInstanceOf[Null]
val res0: Boolean = false
Scalac:
scala> null.isInstanceOf[Null]
<console>:12: error: type Null cannot be used in a type pattern or isInstanceOf test
null.isInstanceOf[Null]
^