diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-10 00:47:01 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-10 00:47:01 -0700 |
commit | 7ecffb0c6719a15c46a1bce5ec8545fb9a1cb24f (patch) | |
tree | 1ebb7737c016bca03fc826cf6a230d727d9fc594 /test/scaladoc/run/t7767.scala | |
parent | 6c431e66f591acdb104f09adaa935dc85e71a469 (diff) | |
parent | aa1bff8c5d87c12f06a81107ed92ac2ff0babbaa (diff) | |
download | scala-7ecffb0c6719a15c46a1bce5ec8545fb9a1cb24f.tar.gz scala-7ecffb0c6719a15c46a1bce5ec8545fb9a1cb24f.tar.bz2 scala-7ecffb0c6719a15c46a1bce5ec8545fb9a1cb24f.zip |
Merge pull request #2922 from huitseeker/issue/7767
SI-7767 avoid rejecting Scaladoc comments in early initializers
Diffstat (limited to 'test/scaladoc/run/t7767.scala')
-rw-r--r-- | test/scaladoc/run/t7767.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/scaladoc/run/t7767.scala b/test/scaladoc/run/t7767.scala new file mode 100644 index 0000000000..6c9ceb511d --- /dev/null +++ b/test/scaladoc/run/t7767.scala @@ -0,0 +1,18 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + + override def code = """ + class Docable extends { /**Doc*/ val foo = 0 } with AnyRef + """ + + // no need for special settings + def scaladocSettings = "" + + def testModel(rootPackage: Package) = { + import access._ + val comment = rootPackage._class("Docable")._value("foo").comment.map(_.body.toString.trim).getOrElse("") + assert(comment.contains("Doc"), comment) + } +} |