8000 Merge pull request #4684 from janekdb/2.11.x-unit-return-in-map · scala/scala-dev@0c4d806 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c4d806

Browse files
committed
Merge pull request #4684 from janekdb/2.11.x-unit-return-in-map
Stop mapping to Unit when executing finally code.
2 parents 1fc65b0 + 6fcd8a6 commit 0c4d806

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/scala/util/control/Exception.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ object Exception {
105105
case x if rethrow(x) => throw x
106106
case x if pf isDefinedAt x => pf(x)
107107
}
108-
finally fin map (_.invoke())
108+
finally fin foreach (_.invoke())
109109

110110
/* Create an empty Try container with this Catch and the supplied `Finally`. */
111111
def andFinally(body: => Unit): Catch[T] = fin match {

0 commit comments

Comments
 (0)
0