diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-03-16 01:25:36 +0100 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-03-16 01:25:36 +0100 |
commit | dca8725cbb04e38f86095fe7fb561fa78cdde9b2 (patch) | |
tree | 2da2b213cb448ab7068e9347f04ce12405530ab6 /test/scaladoc/resources/inheritdoc-corner-cases.scala | |
parent | ee51b6e1b1bc4bd60e6f6bbaea6eb3d4be8b3c97 (diff) | |
download | scala-dca8725cbb04e38f86095fe7fb561fa78cdde9b2.tar.gz scala-dca8725cbb04e38f86095fe7fb561fa78cdde9b2.tar.bz2 scala-dca8725cbb04e38f86095fe7fb561fa78cdde9b2.zip |
Merged and cleaned the 'feature/inheritdoc' branch
Diffstat (limited to 'test/scaladoc/resources/inheritdoc-corner-cases.scala')
-rw-r--r-- | test/scaladoc/resources/inheritdoc-corner-cases.scala | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/test/scaladoc/resources/inheritdoc-corner-cases.scala b/test/scaladoc/resources/inheritdoc-corner-cases.scala new file mode 100644 index 0000000000..8cd995e605 --- /dev/null +++ b/test/scaladoc/resources/inheritdoc-corner-cases.scala @@ -0,0 +1,78 @@ +// TEST1: Inherit from multiple classes +trait A { + /** + * Hello 1 comment + */ + def hello1 = 0 +} + +trait B { + /** + * Hello 2 comment + */ + def hello2 = 1 +} + +trait C extends B + +class D extends A with C { + /** + * Inherited: @inheritdoc + */ + override def hello1 = super.hello2 + + /** + * Inherited: @inheritdoc + */ + override def hello2 = super.hello1 +} + +// TEST2: Invalid inherit: no parents +trait E { + /** + * @inheritdoc + */ + def whereDidThisComeFrom +} + +// TEST3: Invalid inherit, but other parents present +trait F extends E { + /** + * @inheritdoc + */ + def howAboutThis +} + + +// TEST4: Inherit from something that inherits: inherit should propagate +trait G extends D { + /** + * @inheritdoc + */ + override def hello1 = 13 + + /** + * @inheritdoc + */ + override def hello2 = 14 +} + +// TEST5: Inherit missing parameters +trait H extends G { + /** + * Missing params + * @throws HelloException @inheritdoc + * @todo @inheritdoc + */ + override def hello1 = 15 +} + +// TEST6: Inherit from something that inherits in the usecase +trait I extends G { + /** + * @inheritdoc + * @usecase def hello1(i: Int) + * @inheritdoc + */ + override def hello1 = 13 +}
\ No newline at end of file |