diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-22 22:16:03 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-23 09:09:05 +0200 |
commit | 100d82697b2ec747cfc955a9869b8c3d2900f1a2 (patch) | |
tree | 60bbc2115a672a8cc3c87732dda31481a5d1bdf3 /test/files/neg/unchecked2.check | |
parent | 7bd4497c0ab0e7b2536aa01ed5ab6fe545685194 (diff) | |
download | scala-100d82697b2ec747cfc955a9869b8c3d2900f1a2.tar.gz scala-100d82697b2ec747cfc955a9869b8c3d2900f1a2.tar.bz2 scala-100d82697b2ec747cfc955a9869b8c3d2900f1a2.zip |
Improve unchecked warnings.
Spurious test was not good. Better test avoids suppressing
some legitimate warnings. Review by @moors.
Diffstat (limited to 'test/files/neg/unchecked2.check')
-rw-r--r-- | test/files/neg/unchecked2.check | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/unchecked2.check b/test/files/neg/unchecked2.check new file mode 100644 index 0000000000..2c0be9ce00 --- /dev/null +++ b/test/files/neg/unchecked2.check @@ -0,0 +1,19 @@ +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 + 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 + 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 + 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 + 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 + Some(123).isInstanceOf[Option[String => Double]] + ^ +6 errors found |