summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristoph Neijenhuis <whateverhuis@gmail.com>2015-05-15 10:17:28 +0200
committerChristoph Neijenhuis <whateverhuis@gmail.com>2015-05-15 10:17:28 +0200
commitd504017f15692ae72db05118ed2be38daa3b7752 (patch)
tree545fead6b0e3c246d12ecf76765b867cc80c3a25 /src
parent4b0e3bc38a6fe58dbcf43fbe1d21ee8467f7326c (diff)
downloadscala-d504017f15692ae72db05118ed2be38daa3b7752.tar.gz
scala-d504017f15692ae72db05118ed2be38daa3b7752.tar.bz2
scala-d504017f15692ae72db05118ed2be38daa3b7752.zip
Fixed deprecation warning in scaladoc example of Try
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/util/Try.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/util/Try.scala b/src/library/scala/util/Try.scala
index f65c77f5a0..0a6a7972c2 100644
--- a/src/library/scala/util/Try.scala
+++ b/src/library/scala/util/Try.scala
@@ -24,11 +24,12 @@ import scala.language.implicitConversions
*
* Example:
* {{{
+ * import scala.io.StdIn
* import scala.util.{Try, Success, Failure}
*
* def divide: Try[Int] = {
- * val dividend = Try(Console.readLine("Enter an Int that you'd like to divide:\n").toInt)
- * val divisor = Try(Console.readLine("Enter an Int that you'd like to divide by:\n").toInt)
+ * val dividend = Try(StdIn.readLine("Enter an Int that you'd like to divide:\n").toInt)
+ * val divisor = Try(StdIn.readLine("Enter an Int that you'd like to divide by:\n").toInt)
* val problem = dividend.flatMap(x => divisor.map(y => x/y))
* problem match {
* case Success(v) =>