Set PartialFunction[T,Unit] as onResult callback, closing ticket #1077

This commit is contained in:
Viktor Klang 2011-08-03 14:26:01 +02:00
parent 4fac3aa3ad
commit a589238f9c

View file

@ -419,7 +419,7 @@ sealed trait Future[+T] {
* }
* </pre>
*/
final def onResult(pf: PartialFunction[Any, Unit]): this.type = onComplete { f
final def onResult(pf: PartialFunction[T, Unit]): this.type = onComplete { f
val optr = f.result
if (optr.isDefined) {
val r = optr.get