summaryrefslogtreecommitdiff
path: root/test/files/neg/t9535.check
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-10-26 15:47:54 +0100
committerLukas Rytz <lukas.rytz@gmail.com>2015-10-26 17:16:07 +0100
commit4a5a800d4606d917289dc14c35f2035e83f58953 (patch)
tree1ed0ae3e948fc6de0f3bd451ae85e5dbdaacc7d5 /test/files/neg/t9535.check
parent462dc9af886391c9c31cb6949b15e69b0cab55ef (diff)
downloadscala-4a5a800d4606d917289dc14c35f2035e83f58953.tar.gz
scala-4a5a800d4606d917289dc14c35f2035e83f58953.tar.bz2
scala-4a5a800d4606d917289dc14c35f2035e83f58953.zip
SI-9535 correct bytecode and generic signatures for @throws[TypeParam]
For @throws[E] where E is not a class type, GenASM incorrectly writes the non-class type to the classfile. GenBCode used to crash before this commit. Now GenBCode correctly emits the erased type (like javac) and adds a generic signature.
Diffstat (limited to 'test/files/neg/t9535.check')
-rw-r--r--test/files/neg/t9535.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t9535.check b/test/files/neg/t9535.check
new file mode 100644
index 0000000000..5c3e3ea8e6
--- /dev/null
+++ b/test/files/neg/t9535.check
@@ -0,0 +1,7 @@
+t9535.scala:4: error: not found: type E1
+ @throws[E1] def f[E1 <: Exception] = 1
+ ^
+t9535.scala:6: error: class type required but E found
+ @throws(classOf[E]) def g: E = ??? // neg test: classOf requires class type
+ ^
+two errors found