summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/AnnotationInfos.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-11 13:02:53 -0700
committerPaul Phillips <paulp@improving.org>2013-05-11 13:02:53 -0700
commit1850ddf380789e364813111282af5ff11e65b52c (patch)
tree38ae4b5f4f56cf5e24b7ac639b4fb297c171f070 /src/reflect/scala/reflect/internal/AnnotationInfos.scala
parentc85a507ba815643faacd8e07270efbd83b700846 (diff)
downloadscala-1850ddf380789e364813111282af5ff11e65b52c.tar.gz
scala-1850ddf380789e364813111282af5ff11e65b52c.tar.bz2
scala-1850ddf380789e364813111282af5ff11e65b52c.zip
Corralling Modes into a smaller pen.
Attempting to reduce the frequency of low-level operations with modes. I mean stuff like this: if ((mode & (EXPRmode | LHSmode)) == EXPRmode) THey don't make those ten line boolean guards any easier to understand. Hopefully this will lead us toward eliminating some of the modes entirely, or at least better isolating their logic rather than having it interspersed at arbitrary points throughout the typer. Modes are in their entirety a leaked implementation detail. Typing a tree requires a tree and optionally an expected type. It shouldn't require a bucket of state bits. In subsequent commits I will start eliminating them. This commit also breaks adapt down into more digestible chunks.
Diffstat (limited to 'src/reflect/scala/reflect/internal/AnnotationInfos.scala')
-rw-r--r--src/reflect/scala/reflect/internal/AnnotationInfos.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/AnnotationInfos.scala b/src/reflect/scala/reflect/internal/AnnotationInfos.scala
index 90534a9865..73ca74f08e 100644
--- a/src/reflect/scala/reflect/internal/AnnotationInfos.scala
+++ b/src/reflect/scala/reflect/internal/AnnotationInfos.scala
@@ -40,8 +40,7 @@ trait AnnotationInfos extends api.Annotations { self: SymbolTable =>
// monomorphic one by introducing existentials, see SI-7009 for details
existentialAbstraction(throwableSym.typeParams, throwableSym.tpe)
}
- val throwsAnn = AnnotationInfo(appliedType(definitions.ThrowsClass, throwableTpe), List(Literal(Constant(throwableTpe))), Nil)
- withAnnotations(List(throwsAnn))
+ this withAnnotation AnnotationInfo(appliedType(ThrowsClass, throwableTpe), List(Literal(Constant(throwableTpe))), Nil)
}
/** Tests for, get, or remove an annotation */