title: Scala: how to inherit a "static slot"?
body: <p>Well, I'm learning Scala so this question may be too basic for most people.</p>
  
  <p>In Java I can have a static slot (function or variable) in a class, and then I will have that slot in inherited classes too.</p>
  
  <p>In Scala I don't have static slots, but I have companion objects. But I'm finding out that those objects are not part of the inherited class, so if I have two classes <code>Person</code> and <code>Student</code>, and Person has a companion object with a variable <code>all:List</code> that returns a list of all persons so I can do <code>Person.all</code>, I was expecting that I could do <code>Student.all</code> too, but that's not the case.</p>
  
  <p>Is there any way to get the same behaviour that I would get in java?</p>
  
  <p>Thanks!</p>