don't show receiveSignal from ExtensibleBehavior in Receive

The intended API is Behaviors.receiveMessage(...).receiveSignal { case ... }
but in code completion of the Receive two receiveSignal shows up, the one
from ExtensibleBehavior is confusing.

Removing sealed form Behavior isn't so nice, but what else can we do?
This commit is contained in:
Patrik Nordwall 2018-12-21 15:45:41 +01:00
parent b48938f4a0
commit a76a37e060
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ import akka.actor.typed.scaladsl.{ ActorContext ⇒ SAC }
*/ */
@ApiMayChange @ApiMayChange
@DoNotInherit @DoNotInherit
sealed abstract class Behavior[T] { behavior abstract class Behavior[T] { behavior
/** /**
* Narrow the type of this Behavior, which is always a safe operation. This * Narrow the type of this Behavior, which is always a safe operation. This
* method is necessary to implement the contravariant nature of Behavior * method is necessary to implement the contravariant nature of Behavior

View file

@ -253,7 +253,7 @@ object Behaviors {
* signal reception behavior. It's returned by for example [[Behaviors.receiveMessage]]. * signal reception behavior. It's returned by for example [[Behaviors.receiveMessage]].
*/ */
@DoNotInherit @DoNotInherit
trait Receive[T] extends ExtensibleBehavior[T] { trait Receive[T] extends Behavior[T] {
def receiveSignal(onSignal: PartialFunction[(ActorContext[T], Signal), Behavior[T]]): Behavior[T] def receiveSignal(onSignal: PartialFunction[(ActorContext[T], Signal), Behavior[T]]): Behavior[T]
} }