title: Gap in the concept of implicit Ordering of a type used to create a Collection
body: <p>Forgive me if the solution to this problem is too obvious or has been resolved already in this forum earlier (in which case, please point me to the post).</p>
  <p>I have a class</p>
  <pre><code>org.personal.exercises.LengthContentsPair (l: Int, c: String) 
  {
      val length = l
      val contents = c
  
  }
  </code></pre>
  <p>Then, in the same source file, I also define an implicit value which defines the way objects
  of this type is to be ordered, thus:</p>
  <pre><code>object LengthContentsPair  {
  
      implicit val lengthContentsPairOrdering = new Ordering [LengthContentsPair] {
  
         def compare (a: LengthContentsPair, b: LengthContentsPair)= {
     
            a.length compare b.length;
         }
      }
   }
  </code></pre>
  <p>following solutions given in this forum.</p>
  <p>Now, I want to create a specialized Set which limits the number of elements in the Set to a given number. So, I define a separate class like this:</p>
  <pre><code>import scala.collection.immutable.TreeSet;
  
  import org.personal.exercises.LengthContentsPair.lengthContentsPairOrdering;
  
  class FixedSizedSortedSet [LengthContentsPair]  extends TreeSet [LengthContentsPair]  
  { .. 
  }
  </code></pre>
  <p>To me, this seems the correct way to subclass a TreeSet. But, the compiler throws the following error:</p>
  <blockquote>
  <p>(1) No implicit Ordering defined for LengthContentsPair.</p>
  <p>(2) not enough arguments for constructor TreeSet: (implicit ordering: Ordering[LengthContentsPair])scala.collection.immutable.TreeSet[LengthContentsPair]. Unspecified value parameter ordering.</p>
  </blockquote>
  <p>Have I understood the scoping rules wrongly? It is something quite easy I feel, but I cannot put my hand on it.</p>