diff options
author | Janek Bogucki <janekdb@gmail.com> | 2015-08-05 13:05:18 +0100 |
---|---|---|
committer | Janek Bogucki <janekdb@gmail.com> | 2015-08-05 13:05:18 +0100 |
commit | 6fcd8a6d059c574bd18afe73bcb11812bfba3dd3 (patch) | |
tree | deccd5c65da3263d2f2d61135f74fbf219c28fb6 | |
parent | ccded7d179625b38d01a031a0d0f6aaa1bb658a7 (diff) | |
download | scala-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.
-rw-r--r-- | src/library/scala/util/control/Exception.scala | 2 |
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 { |