diff options
author | Cody Allen <ceedubs@gmail.com> | 2015-05-07 19:09:32 -0400 |
---|---|---|
committer | Cody Allen <ceedubs@gmail.com> | 2015-05-07 19:20:57 -0400 |
commit | ee8442d295b095c302acce7bcf22287b26a16ed9 (patch) | |
tree | 3633b6801d77600bf44c8a58dfb571149ac93484 | |
parent | e12ba55589192fc3a3cc7b441569fbcabc04dd33 (diff) | |
download | scala-ee8442d295b095c302acce7bcf22287b26a16ed9.tar.gz scala-ee8442d295b095c302acce7bcf22287b26a16ed9.tar.bz2 scala-ee8442d295b095c302acce7bcf22287b26a16ed9.zip |
Add @throws annotation to GenSeqLike.updated
Similarly to GenSeqLike.apply, GenSeqLike.updated can throw
IndexOutOfBoundsException.
For example, the following throws IndexOutOfBoundsException:
Vector.empty[String].updated(0, "foo")
-rw-r--r-- | src/library/scala/collection/GenSeqLike.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library/scala/collection/GenSeqLike.scala b/src/library/scala/collection/GenSeqLike.scala index cf1de0c8e6..f786293822 100644 --- a/src/library/scala/collection/GenSeqLike.scala +++ b/src/library/scala/collection/GenSeqLike.scala @@ -275,6 +275,7 @@ trait GenSeqLike[+A, +Repr] extends Any with GenIterableLike[A, Repr] with Equal * @tparam That $thatinfo * @param bf $bfinfo * @return a new $coll` which is a copy of this $coll with the element at position `index` replaced by `elem`. + * @throws IndexOutOfBoundsException if `index` does not satisfy `0 <= index < length`. * * @usecase def updated(index: Int, elem: A): $Coll[A] * @inheritdoc |