diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-03-05 14:10:33 +0100 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-03-05 14:10:33 +0100 |
commit | f97fa545cfdc471dc61f69aec9fcccb2c9d0b4a8 (patch) | |
tree | 3965d181d5997d1601968498c37b0008bc94cee6 /src | |
parent | 35252961db5da65307b3ba43ea9db76da73ee902 (diff) | |
download | scala-f97fa545cfdc471dc61f69aec9fcccb2c9d0b4a8.tar.gz scala-f97fa545cfdc471dc61f69aec9fcccb2c9d0b4a8.tar.bz2 scala-f97fa545cfdc471dc61f69aec9fcccb2c9d0b4a8.zip |
Fixes scaladoc rangepos
By making the comment tree node transparent. Reverts previous change
in cfb04ef065. Will mark the bug 5527 as WONTFIX, because the effort
of fixing leaking comments is too great.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 0e5f9ee80e..077f0f9c0e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -658,7 +658,8 @@ self => DocDef(doc, t) setPos { if (t.pos.isDefined) { val pos = doc.pos.withEnd(t.pos.endOrPoint) - if (t.pos.isOpaqueRange) pos else pos.makeTransparent + // always make the position transparent + pos.makeTransparent } else { t.pos } @@ -2967,9 +2968,9 @@ self => val annots = annotations(true) val pos = in.offset val mods = (localModifiers() | implicitMod) withAnnotations annots - val defs = joinComment( // for SI-5527 + val defs = if (!(mods hasFlag ~(Flags.IMPLICIT | Flags.LAZY))) defOrDcl(pos, mods) - else List(tmplDef(pos, mods))) + else List(tmplDef(pos, mods)) in.token match { case RBRACE | CASE => defs :+ (Literal(Constant()) setPos o2p(in.offset)) |