summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/run/t5527.check22
-rw-r--r--test/scaladoc/run/t5527.scala23
2 files changed, 37 insertions, 8 deletions
diff --git a/test/scaladoc/run/t5527.check b/test/scaladoc/run/t5527.check
index ab2aeb2d67..54595652cd 100644
--- a/test/scaladoc/run/t5527.check
+++ b/test/scaladoc/run/t5527.check
@@ -1,11 +1,5 @@
-newSource1:17: warning: discarding unmoored doc comment
- /** Testing 123 */
- ^
-newSource1:27: warning: discarding unmoored doc comment
- /** Calculate this result. */
- ^
-newSource1:34: warning: discarding unmoored doc comment
- /** Another digit is a giveaway. */
+newSource1:47: warning: discarding unmoored doc comment
+ /** Document this crucial constant for posterity.
^
[[syntax trees at end of parser]] // newSource1
package <empty> {
@@ -48,6 +42,18 @@ package <empty> {
val test4 = 'a' match {
case ('0'| '1'| '2'| '3'| '4'| '5'| '6'| '7'| '8'| '9') => true
case _ => false
+ };
+ def test5: scala.Unit = if (true)
+ $qmark$qmark$qmark
+ else
+ ();
+ def test6 = {
+ val u = 4;
+ 0.to(u).foreach(((i) => println(i)))
+ };
+ def test7 = {
+ val u = 4;
+ 0.to(u).foreach(((i) => println(i)))
}
};
/** comments that we should keep */
diff --git a/test/scaladoc/run/t5527.scala b/test/scaladoc/run/t5527.scala
index 2449ff60c3..af0c1f8d36 100644
--- a/test/scaladoc/run/t5527.scala
+++ b/test/scaladoc/run/t5527.scala
@@ -49,6 +49,29 @@ object Test extends DirectTest {
case _ =>
false
}
+
+ def test5 {
+ /** @martin is this right? It shouldn't flag me as scaladoc. */
+ if (true) ???
+ }
+
+ def test6 = {
+ /** Document this crucial constant for posterity.
+ * Don't forget to dedoc this comment if you refactor to a local.
+ * @author Paul Phillips
+ */
+ val u = 4
+ for (i <- 0 to u)
+ println(i)
+ }
+ def test7 = {
+ /** Some standard tags are tolerated locally and shouldn't trigger a warning.
+ * @note Don't change this unless you know what you're doing. This means you.
+ */
+ val u = 4
+ for (i <- 0 to u)
+ println(i)
+ }
}
/** comments that we should keep */