summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2011-09-18 07:43:05 +0000
committerHeather Miller <heather.miller@epfl.ch>2011-09-18 07:43:05 +0000
commit3f58f66c8b2147d728467da9ede91cdcf60a4a8d (patch)
tree67516df06e4269d7c02b04adb03b51ab4dbe8179
parentbe9e2991d90384797781767c58616d4ae04796e8 (diff)
downloadscala-3f58f66c8b2147d728467da9ede91cdcf60a4a8d.tar.gz
scala-3f58f66c8b2147d728467da9ede91cdcf60a4a8d.tar.bz2
scala-3f58f66c8b2147d728467da9ede91cdcf60a4a8d.zip
Small changes to the API documentation of the A...
Small changes to the API documentation of the AnyVal types. Contributed by Michael Allman during the September doc spree. No review.
-rw-r--r--src/compiler/scala/tools/cmd/gen/AnyVals.scala9
-rwxr-xr-xsrc/library/scala/Boolean.scala2
-rw-r--r--src/library/scala/Byte.scala2
-rw-r--r--src/library/scala/Char.scala2
-rw-r--r--src/library/scala/Double.scala2
-rw-r--r--src/library/scala/Float.scala2
-rw-r--r--src/library/scala/Int.scala2
-rw-r--r--src/library/scala/Long.scala2
-rw-r--r--src/library/scala/Short.scala2
-rwxr-xr-xsrc/library/scala/Unit.scala7
10 files changed, 17 insertions, 15 deletions
diff --git a/src/compiler/scala/tools/cmd/gen/AnyVals.scala b/src/compiler/scala/tools/cmd/gen/AnyVals.scala
index 70603bfda6..8f82c997db 100644
--- a/src/compiler/scala/tools/cmd/gen/AnyVals.scala
+++ b/src/compiler/scala/tools/cmd/gen/AnyVals.scala
@@ -262,7 +262,7 @@ package scala
def classDocTemplate = ("""
/** `@name@`@representation@ (equivalent to Java's `@javaequiv@` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `@name@` are not
+ * subtype of [[scala.AnyVal]]. Instances of `@name@` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.@name@]] => [[scala.runtime.Rich@name@]]
@@ -436,9 +436,10 @@ def getClass(): Class[Boolean] = sys.error("stub")
}
object U extends AnyValRep("Unit", None, "void") {
override def classDoc = """
-/** `Unit` (equivalent to Java's `void` type) is a subtype of [[scala.AnyVal]], meaning that
- * it is not represented by an object in the underlying runtime system. There is
- * only one value of type `Unit`: `()`.
+/** `Unit` is a subtype of [[scala.AnyVal]]. There is only one value of type
+ * `Unit`, `()`, and it is not represented by any object in the underlying
+ * runtime system. A method with return type `Unit` is analogous to a Java
+ * method which is declared `void`.
*/
"""
def classLines = List(
diff --git a/src/library/scala/Boolean.scala b/src/library/scala/Boolean.scala
index be96377a21..0adcde3aba 100755
--- a/src/library/scala/Boolean.scala
+++ b/src/library/scala/Boolean.scala
@@ -11,7 +11,7 @@
package scala
/** `Boolean` (equivalent to Java's `boolean` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Boolean` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Boolean` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Boolean]] => [[scala.runtime.RichBoolean]]
diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala
index b9e36b0136..4923cc9786 100644
--- a/src/library/scala/Byte.scala
+++ b/src/library/scala/Byte.scala
@@ -11,7 +11,7 @@
package scala
/** `Byte`, a 8-bit signed integer (equivalent to Java's `byte` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Byte` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Byte` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Byte]] => [[scala.runtime.RichByte]]
diff --git a/src/library/scala/Char.scala b/src/library/scala/Char.scala
index 4bbf02a215..b4e6445899 100644
--- a/src/library/scala/Char.scala
+++ b/src/library/scala/Char.scala
@@ -11,7 +11,7 @@
package scala
/** `Char`, a 16-bit unsigned integer (equivalent to Java's `char` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Char` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Char` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Char]] => [[scala.runtime.RichChar]]
diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala
index b4bb9f0432..68a1a01299 100644
--- a/src/library/scala/Double.scala
+++ b/src/library/scala/Double.scala
@@ -11,7 +11,7 @@
package scala
/** `Double`, a 64-bit IEEE-754 floating point number (equivalent to Java's `double` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Double` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Double` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Double]] => [[scala.runtime.RichDouble]]
diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala
index ed61168e90..709d73d408 100644
--- a/src/library/scala/Float.scala
+++ b/src/library/scala/Float.scala
@@ -11,7 +11,7 @@
package scala
/** `Float`, a 32-bit IEEE-754 floating point number (equivalent to Java's `float` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Float` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Float` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Float]] => [[scala.runtime.RichFloat]]
diff --git a/src/library/scala/Int.scala b/src/library/scala/Int.scala
index 8ad678acfe..519a0486ac 100644
--- a/src/library/scala/Int.scala
+++ b/src/library/scala/Int.scala
@@ -11,7 +11,7 @@
package scala
/** `Int`, a 32-bit signed integer (equivalent to Java's `int` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Int` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Int` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Int]] => [[scala.runtime.RichInt]]
diff --git a/src/library/scala/Long.scala b/src/library/scala/Long.scala
index 2a2bc896ac..9c7a803f08 100644
--- a/src/library/scala/Long.scala
+++ b/src/library/scala/Long.scala
@@ -11,7 +11,7 @@
package scala
/** `Long`, a 64-bit signed integer (equivalent to Java's `long` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Long` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Long` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Long]] => [[scala.runtime.RichLong]]
diff --git a/src/library/scala/Short.scala b/src/library/scala/Short.scala
index 0cba03db37..a9210d3555 100644
--- a/src/library/scala/Short.scala
+++ b/src/library/scala/Short.scala
@@ -11,7 +11,7 @@
package scala
/** `Short`, a 16-bit signed integer (equivalent to Java's `short` primitive type) is a
- * subtype of [[scala.AnyVal]], meaning that instances of `Short` are not
+ * subtype of [[scala.AnyVal]]. Instances of `Short` are not
* represented by an object in the underlying runtime system.
*
* There is an implicit conversion from [[scala.Short]] => [[scala.runtime.RichShort]]
diff --git a/src/library/scala/Unit.scala b/src/library/scala/Unit.scala
index 0059ded33a..57970b021b 100755
--- a/src/library/scala/Unit.scala
+++ b/src/library/scala/Unit.scala
@@ -11,9 +11,10 @@
package scala
-/** `Unit` (equivalent to Java's `void` type) is a subtype of [[scala.AnyVal]], meaning that
- * it is not represented by an object in the underlying runtime system. There is
- * only one value of type `Unit`: `()`.
+/** `Unit` is a subtype of [[scala.AnyVal]]. There is only one value of type
+ * `Unit`, `()`, and it is not represented by any object in the underlying
+ * runtime system. A method with return type `Unit` is analogous to a Java
+ * method which is declared `void`.
*/
final class Unit extends AnyVal {
def getClass(): Class[Unit] = sys.error("stub")