LoginSignup
2
1

More than 5 years have passed since last update.

Scala 2.10.0 で型変数の実行時判定ができなくなる警告が出ないことがあるかも

Posted at

このコードは2.9.1だと警告が出るけど、2.10.0だと出ない。

Sample.scala
type LS = List[String]
def f(x : Any) = x match {
  case (x : LS) => Some(x)
  case _ => None
}
2
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1