Question regarding pound sign #

I came across this code and don’t understand the use of pound sign here. I googled and thought the pound sign is used for inner class but there is no inner class here. Puzzled…

class OrderMessageBus extends EventBus with LookupClassification with ActorEventBus {
  type Event = Order
  type Classifier = Boolean
  def mapSize = 2

  protected def classify(event: OrderMessageBus#Event) = {
    event.number > 1
  }
  protected def publish(event: OrderMessageBus#Event, subscriber: OrderMessageBus#Subscriber):Unit = {
    subscriber ! event
  }
}

Not just inner classes but inner types in general. That means inner class types, but also inner type members/type aliases, like Event in your example. It’s called a ‘type projection’.

2 Likes

Thanks i needed to know the keyword(type projection) so that i can look more into it.