diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/util/control/TailCalls.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/util/control/TailCalls.scala b/src/library/scala/util/control/TailCalls.scala index c3e7d98073..953d5b407e 100644 --- a/src/library/scala/util/control/TailCalls.scala +++ b/src/library/scala/util/control/TailCalls.scala @@ -55,7 +55,7 @@ object TailCalls { case Done(a) => Call(() => f(a)) case c@Call(_) => Cont(c, f) // Take advantage of the monad associative law to optimize the size of the required stack - case Cont(s, g) => Cont(s, (x:Any) => g(x).flatMap(f)) + case c: Cont[a1, b1] => Cont(c.a, (x: a1) => c f x flatMap f) } /** Returns either the next step of the tailcalling computation, |