summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2010-08-12 09:02:46 +0000
committerMartin Odersky <odersky@gmail.com>2010-08-12 09:02:46 +0000
commite3743b812ab05f15db8a8e64e47f8b92948fe180 (patch)
tree8005ae019584808b3c7e59ad1bd16d6079f837c1 /src
parent3b8fee9184ebe1be9dfea690e180918b176726a3 (diff)
downloadscala-e3743b812ab05f15db8a8e64e47f8b92948fe180.tar.gz
scala-e3743b812ab05f15db8a8e64e47f8b92948fe180.tar.bz2
scala-e3743b812ab05f15db8a8e64e47f8b92948fe180.zip
Changes in docs and layout. No review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/io/AbstractFile.scala4
-rw-r--r--src/library/scala/collection/TraversableOnce.scala5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/io/AbstractFile.scala b/src/compiler/scala/tools/nsc/io/AbstractFile.scala
index fd96da4f73..870cc64913 100644
--- a/src/compiler/scala/tools/nsc/io/AbstractFile.scala
+++ b/src/compiler/scala/tools/nsc/io/AbstractFile.scala
@@ -106,9 +106,7 @@ abstract class AbstractFile extends AnyRef with Iterable[AbstractFile] {
def underlyingSource: Option[AbstractFile] = None
/** Does this abstract file denote an existing file? */
- def exists: Boolean =
- if (file ne null) file.exists
- else true
+ def exists: Boolean = (file eq null) || file.exists
/** Does this abstract file represent something which can contain classfiles? */
def isClassContainer = isDirectory || (sfile exists (Path isJarOrZip _))
diff --git a/src/library/scala/collection/TraversableOnce.scala b/src/library/scala/collection/TraversableOnce.scala
index de4eb6fc22..6656b05083 100644
--- a/src/library/scala/collection/TraversableOnce.scala
+++ b/src/library/scala/collection/TraversableOnce.scala
@@ -294,7 +294,7 @@ trait TraversableOnce[+A] {
* @tparam B the result type of the `*` operator.
* @return the product of all elements of this $coll with respect to the `*` operator in `num`.
*
- * @usecase def product: Int
+ * @usecase def product: A
*
* @return the product of all elements in this $coll of numbers of type `Int`.
* Instead of `Int`, any other type `T` with an implicit `Numeric[T]` implementation
@@ -442,6 +442,9 @@ trait TraversableOnce[+A] {
* is undefined.
* $willNotTerminateInf
* @return a map containing all elements of this $coll.
+ * @usecase def toMap: Map[K, V]
+ * @return a map of type `immutable.Map[K, V]`
+ * containing all key/value pairs of type `(K, V)` of this $coll.
*/
def toMap[T, U](implicit ev: A <:< (T, U)): immutable.Map[T, U] = {
val b = immutable.Map.newBuilder[T, U]