From 02dd4c974f33d137ea353a72e27efb70928fb378 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Mon, 4 Feb 2013 22:23:54 +0100 Subject: reflecting @throws defined in Scala code As per Jason's comment: How are Scala classes containing @throws annots treated? I can't figure out whether we pickle the annotation in addition to adding the exception to the signature. If we do, might we end up with duplicate annotations in runtime reflection? This warrants a test. See the context of the discussion here: https://github.com/scala/scala/pull/2040/files#r2874769. No, we won't end up with duplicates, because classes defined in Scala are loaded in a different completer. But I'll add a test - you can never have too many of those. --- test/files/run/t7008-scala-defined.check | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/files/run/t7008-scala-defined.check (limited to 'test/files/run/t7008-scala-defined.check') diff --git a/test/files/run/t7008-scala-defined.check b/test/files/run/t7008-scala-defined.check new file mode 100644 index 0000000000..84ed62619e --- /dev/null +++ b/test/files/run/t7008-scala-defined.check @@ -0,0 +1,7 @@ +: List(throws[NullPointerException]("")) +bar: List(throws[E1]("")) +baz: List(throws[IllegalStateException]("")) +============= +: List(throws[NullPointerException]("")) +bar: List(throws[E1]("")) +baz: List(throws[IllegalStateException]("")) -- cgit v1.2.3