diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-21 19:49:55 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-07-27 05:42:17 -0700 |
commit | bc719cb8e4957a80e423350d8e993f1fa6a2a997 (patch) | |
tree | 2939e8688721c66fd1493bdadf9260d75faa4514 /test/files/neg/unchecked2.check | |
parent | ad08f24448729009fc8d5ff0acf307a43b4cfe0a (diff) | |
download | scala-bc719cb8e4957a80e423350d8e993f1fa6a2a997.tar.gz scala-bc719cb8e4957a80e423350d8e993f1fa6a2a997.tar.bz2 scala-bc719cb8e4957a80e423350d8e993f1fa6a2a997.zip |
Improve unchecked warnings a lot.
Don't warn on "uncheckable" type patterns if they can be
statically guaranteed, regardless of their runtime checkability.
This covers patterns like Seq[Any] and lots more.
Review by @adriaanm.
Diffstat (limited to 'test/files/neg/unchecked2.check')
-rw-r--r-- | test/files/neg/unchecked2.check | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/neg/unchecked2.check b/test/files/neg/unchecked2.check index 2c0be9ce00..e37865928e 100644 --- a/test/files/neg/unchecked2.check +++ b/test/files/neg/unchecked2.check @@ -1,19 +1,19 @@ -unchecked2.scala:2: error: non variable type-argument Int in type Option[Int] is unchecked since it is eliminated by erasure +unchecked2.scala:2: error: non-variable type argument Int in type Option[Int] is unchecked since it is eliminated by erasure Some(123).isInstanceOf[Option[Int]] ^ -unchecked2.scala:3: error: non variable type-argument String in type Option[String] is unchecked since it is eliminated by erasure +unchecked2.scala:3: error: non-variable type argument String in type Option[String] is unchecked since it is eliminated by erasure Some(123).isInstanceOf[Option[String]] ^ -unchecked2.scala:4: error: non variable type-argument List[String] in type Option[List[String]] is unchecked since it is eliminated by erasure +unchecked2.scala:4: error: non-variable type argument List[String] in type Option[List[String]] is unchecked since it is eliminated by erasure Some(123).isInstanceOf[Option[List[String]]] ^ -unchecked2.scala:5: error: non variable type-argument List[Int => String] in type Option[List[Int => String]] is unchecked since it is eliminated by erasure +unchecked2.scala:5: error: non-variable type argument List[Int => String] in type Option[List[Int => String]] is unchecked since it is eliminated by erasure Some(123).isInstanceOf[Option[List[Int => String]]] ^ -unchecked2.scala:6: error: non variable type-argument (String, Double) in type Option[(String, Double)] is unchecked since it is eliminated by erasure +unchecked2.scala:6: error: non-variable type argument (String, Double) in type Option[(String, Double)] is unchecked since it is eliminated by erasure Some(123).isInstanceOf[Option[(String, Double)]] ^ -unchecked2.scala:7: error: non variable type-argument String => Double in type Option[String => Double] is unchecked since it is eliminated by erasure +unchecked2.scala:7: error: non-variable type argument String => Double in type Option[String => Double] is unchecked since it is eliminated by erasure Some(123).isInstanceOf[Option[String => Double]] ^ 6 errors found |