summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-10-29 14:02:06 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-10-29 14:02:06 +0000
commit223bcfc6abf53a2239692d7299409991b805efaa (patch)
tree18e19fa086e6532a1a5dca3872edc445d253ed0e /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent41b0aefbf54d7cff0c15e634bea1501c55daa172 (diff)
downloadscala-223bcfc6abf53a2239692d7299409991b805efaa.tar.gz
scala-223bcfc6abf53a2239692d7299409991b805efaa.tar.bz2
scala-223bcfc6abf53a2239692d7299409991b805efaa.zip
AnnotationInfo.pos no longer in constructor.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 4e821f30a5..31bddb55d2 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2397,7 +2397,7 @@ trait Typers { self: Analyzer =>
* @param annClass the expected annotation class
*/
def typedAnnotation(ann: Tree, mode: Int = EXPRmode, selfsym: Symbol = NoSymbol, annClass: Symbol = AnnotationClass, requireJava: Boolean = false): AnnotationInfo = {
- lazy val annotationError = AnnotationInfo(ErrorType, Nil, Nil, NoPosition)
+ lazy val annotationError = AnnotationInfo(ErrorType, Nil, Nil)
var hasError: Boolean = false
def error(pos: Position, msg: String) = {
context.error(pos, msg)
@@ -2508,13 +2508,13 @@ trait Typers { self: Analyzer =>
}
for (name <- names) {
- if (!name.annotations.contains(AnnotationInfo(AnnotationDefaultAttr.tpe, List(), List(), NoPosition)) &&
+ if (!name.annotations.contains(AnnotationInfo(AnnotationDefaultAttr.tpe, List(), List())) &&
!name.hasFlag(DEFAULTPARAM))
error(ann.pos, "annotation " + annType.typeSymbol.fullNameString + " is missing argument " + name.name)
}
if (hasError) annotationError
- else AnnotationInfo(annType, List(), nvPairs map {p => (p._1, p._2.get)}, ann.pos)
+ else AnnotationInfo(annType, List(), nvPairs map {p => (p._1, p._2.get)}).setPos(ann.pos)
}
} else if (requireJava) {
error(ann.pos, "nested classfile annotations must be defined in java; found: "+ annType)
@@ -2554,7 +2554,7 @@ trait Typers { self: Analyzer =>
def annInfo(t: Tree): AnnotationInfo = t match {
case Apply(Select(New(tpt), nme.CONSTRUCTOR), args) =>
- AnnotationInfo(annType, args, List(), t.pos)
+ AnnotationInfo(annType, args, List()).setPos(t.pos)
case Block(stats, expr) =>
context.warning(t.pos, "Usage of named or default arguments transformed this annotation\n"+