Changed message type to Any instead of AnyRef in ask method. See #1608

This commit is contained in:
Patrik Nordwall 2012-01-05 17:54:01 +01:00
parent 1850f6e5b7
commit ee17fd8be7

View file

@ -127,9 +127,9 @@ abstract class ActorRef extends java.lang.Comparable[ActorRef] with Serializable
* the callback will be scheduled concurrently to the enclosing actor. Unfortunately
* there is not yet a way to detect these illegal accesses at compile time.
*/
def ask(message: AnyRef, timeout: Timeout): Future[AnyRef] = ?(message, timeout).asInstanceOf[Future[AnyRef]]
def ask(message: Any, timeout: Timeout): Future[AnyRef] = ?(message, timeout).asInstanceOf[Future[AnyRef]]
def ask(message: AnyRef, timeoutMillis: Long): Future[AnyRef] = ask(message, new Timeout(timeoutMillis))
def ask(message: Any, timeoutMillis: Long): Future[AnyRef] = ask(message, new Timeout(timeoutMillis))
/**
* Forwards the message and passes the original sender actor as the sender.