abeln / dotty

Scala with explicit nulls
https://github.com/abeln/dotty/wiki/scala-with-explicit-nulls
Other
23 stars 2 forks source link

Warn when pattern matching against non-nullable array #23

Open abeln opened 5 years ago

abeln commented 5 years ago

The pattern matcher can't distinguish between

??? match {
  case a: Array[String|Null] => ???
  case a: Array[String] => ???
}

Should we warn the user when they try to do this?