diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-14 23:29:50 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-26 11:19:36 -0800 |
commit | 832fc9a67e5aa85bdde61883527d3ac9554094d7 (patch) | |
tree | b5bc08f2ef57331efa66c956112bface14cd530f /src/library/scala/throws.scala | |
parent | 72f36cbc80d5667c5ada3b7c0fe60435a4b202ad (diff) | |
download | scala-832fc9a67e5aa85bdde61883527d3ac9554094d7.tar.gz scala-832fc9a67e5aa85bdde61883527d3ac9554094d7.tar.bz2 scala-832fc9a67e5aa85bdde61883527d3ac9554094d7.zip |
SI-2577, SI-6860: annotation type inference.
This is less than ideal:
scala> class Bippy[T] extends annotation.StaticAnnotation
defined class Bippy
scala> def f: Int @Bippy = 5
f: Int @Bippy[T]
Turns out we can infer such types. Now it says:
scala> def f: Int @Bippy = 5
f: Int @Bippy[Nothing]
This should put to rest many an issue with parameterized
annotations.
Diffstat (limited to 'src/library/scala/throws.scala')
-rw-r--r-- | src/library/scala/throws.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/throws.scala b/src/library/scala/throws.scala index 159f1f02f4..5a5dd9a1f5 100644 --- a/src/library/scala/throws.scala +++ b/src/library/scala/throws.scala @@ -24,5 +24,5 @@ package scala * @since 2.1 */ class throws[T <: Throwable](cause: String = "") extends scala.annotation.StaticAnnotation { - def this(clazz: Class[T]) = this() + def this(clazz: Class[T]) = this("") } |