diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-02-04 22:23:54 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-02-04 22:23:54 +0100 |
commit | 02dd4c974f33d137ea353a72e27efb70928fb378 (patch) | |
tree | 277283b686506db7f237a662de3e375347190bda /test/files/run/t7008-scala-defined/ScalaClassWithCheckedExceptions_1.scala | |
parent | 0bcdf71a96d6d0b6276801efbe49081f0ae7749d (diff) | |
download | scala-02dd4c974f33d137ea353a72e27efb70928fb378.tar.gz scala-02dd4c974f33d137ea353a72e27efb70928fb378.tar.bz2 scala-02dd4c974f33d137ea353a72e27efb70928fb378.zip |
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.
Diffstat (limited to 'test/files/run/t7008-scala-defined/ScalaClassWithCheckedExceptions_1.scala')
-rw-r--r-- | test/files/run/t7008-scala-defined/ScalaClassWithCheckedExceptions_1.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/run/t7008-scala-defined/ScalaClassWithCheckedExceptions_1.scala b/test/files/run/t7008-scala-defined/ScalaClassWithCheckedExceptions_1.scala new file mode 100644 index 0000000000..7783c873ec --- /dev/null +++ b/test/files/run/t7008-scala-defined/ScalaClassWithCheckedExceptions_1.scala @@ -0,0 +1,6 @@ +class ScalaClassWithCheckedExceptions_1[E1 <: Exception] @throws[NullPointerException]("") () { + @throws[E1]("") def bar() {} + @throws[IllegalStateException]("") def baz(x: Int) {} + // FIXME: SI-7066 + // @throws[E2]("") def foo[E2 <: Exception] {} +}
\ No newline at end of file |