diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-08-06 20:49:38 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-08-06 20:49:38 +0000 |
commit | a00c8f75f17206b0a6f055d5db168415054aeb34 (patch) | |
tree | 369070030389a9cf433aaf7b0db6b825d6d433e0 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | e114becbc9f1de72b6dabc8c3c84d352187a61bb (diff) | |
download | scala-a00c8f75f17206b0a6f055d5db168415054aeb34.tar.gz scala-a00c8f75f17206b0a6f055d5db168415054aeb34.tar.bz2 scala-a00c8f75f17206b0a6f055d5db168415054aeb34.zip |
- annotations can follow a type in addition to ...
- annotations can follow a type in addition to preceding it -
annotations are traversed by tree Traverser's - the internal
representation of declaration annotations is now type checkable
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 5979cd3add..96238bd76e 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1728,12 +1728,12 @@ trait Typers { self: Analyzer => names.retain(sym => sym.name != nme.value) } val nvPairs = annot.elements map { - case Assign(ntree @ Ident(name), rhs) => { + case vd @ ValDef(_, name, _, rhs) => { val sym = attrScope.lookup(name); if (sym == NoSymbol) { - error(ntree.pos, "unknown attribute element name: " + name) + error(vd.pos, "unknown attribute element name: " + name) } else if (!names.contains(sym)) { - error(ntree.pos, "duplicate value for element " + name) + error(vd.pos, "duplicate value for element " + name) } else { names -= sym val annArg = |