summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-07-22 18:37:35 -0700
committerJakob Odersky <jakob@odersky.com>2016-07-26 11:42:26 -0700
commit5eb19785c3d89b21919725a46375324890e993e7 (patch)
treeccab81453491e0b10e81d0442a4f42a0231d5ac3 /test/scaladoc
parentd39ce7a66ad1d24d620339a90293c6f4d86de1dc (diff)
downloadscala-5eb19785c3d89b21919725a46375324890e993e7.tar.gz
scala-5eb19785c3d89b21919725a46375324890e993e7.tar.bz2
scala-5eb19785c3d89b21919725a46375324890e993e7.zip
Javadoc: fix assertion errors for java fields
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/resources/SI-4826.java66
1 files changed, 65 insertions, 1 deletions
diff --git a/test/scaladoc/resources/SI-4826.java b/test/scaladoc/resources/SI-4826.java
index f735ce6335..34e55ab26e 100644
--- a/test/scaladoc/resources/SI-4826.java
+++ b/test/scaladoc/resources/SI-4826.java
@@ -1,3 +1,6 @@
+/**
+ * A package header
+ */
package test.scaladoc;
/**
@@ -6,6 +9,29 @@ package test.scaladoc;
*/
public class JavaComments {
+ /** A field */
+ public final int x;
+ /** A field */
+ protected int y;
+ /** A field */
+ private int z;
+
+ /**
+ * Inner class
+ */
+ public class Inner {
+ /** Inner method */
+ public void foo() {
+ }
+ }
+
+ /**
+ * A typed inner class
+ * @param <T> some type
+ */
+ public class InnerTyped<T> {
+ }
+
/**
* Compute the answer to the ultimate question of life, the
* universe, and everything. :marker:
@@ -16,5 +42,43 @@ public class JavaComments {
return 42 * factor;
}
-}
+ /** Private */
+ private double foo(double value) {
+ return value;
+ }
+
+ /** Protected */
+ protected double bar(double value) {
+ return value;
+ }
+
+ /** No qualifier*/
+ String noqualifier() {
+ return "something";
+ }
+
+ /** Void */
+ public void voidmethod(boolean t) {
+ }
+
+ /**
+ * Typed parameter
+ * @param <A> the parameter type
+ * @param a parameter
+ * @return something
+ */
+ public <A> void tparams(A a) {
+ }
+ /**
+ * Typed parameter
+ * @param <A> the return type
+ * @param <B> the parameter typeA
+ * @param b parameter
+ * @return casts B to A
+ */
+ public <A, B extends A> A cast(B b) {
+ return (B) b;
+ }
+
+}