diff options
author | Seth Tisue <seth@tisue.net> | 2015-08-06 14:38:02 -0700 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2015-08-06 14:38:02 -0700 |
commit | 0c4d806b89b78b8c25618dbd01e6ad7122facca7 (patch) | |
tree | 11429fec9725d4bf0cb908a61cee369ede8e934a /src/library | |
parent | 1fc65b00b603dc72a7c8e10cbac9dd9bb9ddae41 (diff) | |
parent | 6fcd8a6d059c574bd18afe73bcb11812bfba3dd3 (diff) | |
download | scala-0c4d806b89b78b8c25618dbd01e6ad7122facca7.tar.gz scala-0c4d806b89b78b8c25618dbd01e6ad7122facca7.tar.bz2 scala-0c4d806b89b78b8c25618dbd01e6ad7122facca7.zip |
Merge pull request #4684 from janekdb/2.11.x-unit-return-in-map
Stop mapping to Unit when executing finally code.
Diffstat (limited to 'src/library')
-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 { |