diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-01-30 21:27:59 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-01-31 11:59:40 +0100 |
commit | 941c56918e052a1c619f35b24c6aa6c736390dc5 (patch) | |
tree | 24ce6935593baa26fe276e9ef91994bb69ef023d /test/scaladoc/run | |
parent | 2fa859e1b3eb2ac57058feaba87d96adfbac9209 (diff) | |
download | scala-941c56918e052a1c619f35b24c6aa6c736390dc5.tar.gz scala-941c56918e052a1c619f35b24c6aa6c736390dc5.tar.bz2 scala-941c56918e052a1c619f35b24c6aa6c736390dc5.zip |
SI-6812 scaladoc can opt out of expanding macros
This is a temporary change, possible only because macros currently can't
affect the global symbol table (except for the case when they will steer
inference of a method's return type).
Later on, e.g. with the addition of c.introduceTopLevel in master,
we will have to upgrade Scaladoc to allow for separate generation of
documentation, because then we'll be forced to expand macros in order to
get the whole picture of the code.
Diffstat (limited to 'test/scaladoc/run')
-rw-r--r-- | test/scaladoc/run/SI-6812.check | 1 | ||||
-rw-r--r-- | test/scaladoc/run/SI-6812.scala | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/scaladoc/run/SI-6812.check b/test/scaladoc/run/SI-6812.check new file mode 100644 index 0000000000..619c56180b --- /dev/null +++ b/test/scaladoc/run/SI-6812.check @@ -0,0 +1 @@ +Done. diff --git a/test/scaladoc/run/SI-6812.scala b/test/scaladoc/run/SI-6812.scala new file mode 100644 index 0000000000..fbd9588ede --- /dev/null +++ b/test/scaladoc/run/SI-6812.scala @@ -0,0 +1,24 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest +import language._ + +object Test extends ScaladocModelTest { + + override def code = """ + import scala.reflect.macros.Context + import language.experimental.macros + + object Macros { + def impl(c: Context) = c.literalUnit + def foo = macro impl + } + + class C { + def bar = Macros.foo + } + """ + + def scaladocSettings = "" + override def extraSettings = super.extraSettings + " -Ymacro-no-expand" + def testModel(root: Package) = () +} |