diff options
author | Paul Phillips <paulp@improving.org> | 2012-08-21 15:13:01 +0200 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-08-21 15:15:54 +0200 |
commit | 1c6543dc7dfd839cf11f54a8de1b7f6c7e1c9247 (patch) | |
tree | 5139ea91fc3cf20e69823a45aa966e1a9c0d4b85 /test/files/neg | |
parent | 1ab4994990a21c1ea4dadcf15368013d89456ca6 (diff) | |
download | scala-1c6543dc7dfd839cf11f54a8de1b7f6c7e1c9247.tar.gz scala-1c6543dc7dfd839cf11f54a8de1b7f6c7e1c9247.tar.bz2 scala-1c6543dc7dfd839cf11f54a8de1b7f6c7e1c9247.zip |
Fix for SI-6264, crash in checkCheckable.
The classic fail of assuming you will only receive a
specific subclass of Type.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t6264.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6264.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t6264.scala | 6 |
3 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t6264.check b/test/files/neg/t6264.check new file mode 100644 index 0000000000..438be4c39f --- /dev/null +++ b/test/files/neg/t6264.check @@ -0,0 +1,4 @@ +t6264.scala:3: error: non-variable type argument Tuple1[_] in type Tuple2[_, Tuple1[_]] is unchecked since it is eliminated by erasure + x.isInstanceOf[Tuple2[_, Tuple1[_]]] + ^ +one error found diff --git a/test/files/neg/t6264.flags b/test/files/neg/t6264.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/neg/t6264.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/neg/t6264.scala b/test/files/neg/t6264.scala new file mode 100644 index 0000000000..dc3b727934 --- /dev/null +++ b/test/files/neg/t6264.scala @@ -0,0 +1,6 @@ +class Foo { + def foo(x: AnyRef): Unit = { + x.isInstanceOf[Tuple2[_, Tuple1[_]]] + () + } +} |