summaryrefslogtreecommitdiff
path: root/src/library/scala/util/control
diff options
context:
space:
mode:
authorJanek Bogucki <janekdb@gmail.com>2015-08-05 13:05:18 +0100
committerJanek Bogucki <janekdb@gmail.com>2015-08-05 13:05:18 +0100
commit6fcd8a6d059c574bd18afe73bcb11812bfba3dd3 (patch)
treedeccd5c65da3263d2f2d61135f74fbf219c28fb6 /src/library/scala/util/control
parentccded7d179625b38d01a031a0d0f6aaa1bb658a7 (diff)
downloadscala-6fcd8a6d059c574bd18afe73bcb11812bfba3dd3.tar.gz
scala-6fcd8a6d059c574bd18afe73bcb11812bfba3dd3.tar.bz2
scala-6fcd8a6d059c574bd18afe73bcb11812bfba3dd3.zip
Stop mapping to Unit when executing finally code.
Finally.invoke has result type Unit so foreach is sufficient here.
Diffstat (limited to 'src/library/scala/util/control')
-rw-r--r--src/library/scala/util/control/Exception.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/util/control/Exception.scala b/src/library/scala/util/control/Exception.scala
index aa30887ba0..24c297a2fc 100644
--- a/src/library/scala/util/control/Exception.scala
+++ b/src/library/scala/util/control/Exception.scala
@@ -105,7 +105,7 @@ object Exception {
case x if rethrow(x) => throw x
case x if pf isDefinedAt x => pf(x)
}
- finally fin map (_.invoke())
+ finally fin foreach (_.invoke())
/* Create an empty Try container with this Catch and the supplied `Finally`. */
def andFinally(body: => Unit): Catch[T] = fin match {