summaryrefslogtreecommitdiff
path: root/test/files/run/t8549b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t8549b.scala')
-rw-r--r--test/files/run/t8549b.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t8549b.scala b/test/files/run/t8549b.scala
new file mode 100644
index 0000000000..1e1bf2c0bc
--- /dev/null
+++ b/test/files/run/t8549b.scala
@@ -0,0 +1,16 @@
+
+@SerialVersionUID(42)
+class C
+
+@SerialVersionUID(43 - 1)
+class D
+
+
+object Test extends App {
+ def checkId(cls: Class[_]) {
+ val id = cls.getDeclaredField("serialVersionUID").get(null)
+ assert(id == 42, (cls, id))
+ }
+ checkId(classOf[C])
+ checkId(classOf[D])
+}