Skip to content

Instantly share code, notes, and snippets.

@diogoaurelio
Created December 20, 2017 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogoaurelio/376e40104ae660447aaa3201f10810d6 to your computer and use it in GitHub Desktop.
Save diogoaurelio/376e40104ae660447aaa3201f10810d6 to your computer and use it in GitHub Desktop.
summaryScalaActorTrait
trait Actor {
// to make type Receive known in subclasses without import
type Receive = Actor.Receive
// [...]
//#receive
def receive: Actor.Receive
// [...]
}
object Actor {
type Receive = PartialFunction[Any, Unit]
// [...]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment