From a9e903586e8e0547d0913b9427ee19a20092798d Mon Sep 17 00:00:00 2001 From: Antoine Gourlay Date: Fri, 31 Jan 2014 20:17:35 +0100 Subject: SI-7124 make macro definitions prettier in scaladoc Macros are now prettier in scaladoc, by - hiding the `macroImpl` annotation - showing the `macro` modifier in front --- test/scaladoc/run/t7124.check | 3 +++ test/scaladoc/run/t7124.scala | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/scaladoc/run/t7124.check create mode 100644 test/scaladoc/run/t7124.scala (limited to 'test') diff --git a/test/scaladoc/run/t7124.check b/test/scaladoc/run/t7124.check new file mode 100644 index 0000000000..96b627a322 --- /dev/null +++ b/test/scaladoc/run/t7124.check @@ -0,0 +1,3 @@ +List() +List(Paragraph(Text(macro))) +Done. diff --git a/test/scaladoc/run/t7124.scala b/test/scaladoc/run/t7124.scala new file mode 100644 index 0000000000..e8272000d2 --- /dev/null +++ b/test/scaladoc/run/t7124.scala @@ -0,0 +1,22 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + + override def code = """ + import scala.language.experimental.macros + class Test { + def print(): Unit = macro ??? + } + """ + + def scaladocSettings = "" + + def testModel(root: Package) = { + import access._ + val p = root._class("Test")._method("print") + + println(p.annotations) // no annotations + println(p.flags) // a 'macro' flag + } +} -- cgit v1.2.3