diff options
author | Miles Sabin <miles@milessabin.com> | 2009-10-14 22:10:20 +0000 |
---|---|---|
committer | Miles Sabin <miles@milessabin.com> | 2009-10-14 22:10:20 +0000 |
commit | b57abb7bfefdc8b1c07742cd01ab2b620bcc018a (patch) | |
tree | 9532fbc6868ba3546b6fbc435ef41dd610c53ca8 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 9d9889a7d6b9625aff6ee9ef72850cd9c9e7c17c (diff) | |
download | scala-b57abb7bfefdc8b1c07742cd01ab2b620bcc018a.tar.gz scala-b57abb7bfefdc8b1c07742cd01ab2b620bcc018a.tar.bz2 scala-b57abb7bfefdc8b1c07742cd01ab2b620bcc018a.zip |
Scaladoc comment position fixes with tests; sca...
Scaladoc comment position fixes with tests; scaladoc comment postions
are now accessible by symbol; respond retry in interactive Global is now
handled properly.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index ebcd18082d..e07d1e252d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1392,8 +1392,8 @@ trait Typers { self: Analyzer => } if (mods hasFlag DEFERRED) gs.toList else vdef :: gs.toList } - case DocDef(comment, defn) => - addGetterSetter(defn) map (stat => DocDef(comment, stat)) + case dd @ DocDef(comment, defn) => + addGetterSetter(defn) map (stat => DocDef(comment, stat) setPos dd.pos) case Annotated(annot, defn) => addGetterSetter(defn) map (stat => Annotated(annot, stat)) @@ -3519,9 +3519,12 @@ trait Typers { self: Analyzer => case ldef @ LabelDef(_, _, _) => labelTyper(ldef).typedLabelDef(ldef) - case DocDef(comment, defn) => + case ddef @ DocDef(comment, defn) => val ret = typed(defn, mode, pt) - if ((comments ne null) && (defn.symbol ne null) && (defn.symbol ne NoSymbol)) comments(defn.symbol) = comment + if ((comments ne null) && (defn.symbol ne null) && (defn.symbol ne NoSymbol)) { + comments(defn.symbol) = comment + commentOffsets(defn.symbol) = ddef.pos.startOrPoint + } ret case Annotated(constr, arg) => |