title: How to work around type parameter of class shadowed by method
body: <p>With the following code, >= and &lt;= methods are using implicit parameter and context bound, which are essentially the same.</p>
  
  <pre><code>@Test
  def testOrdering(): Unit = {
    class Box[T](val data: T) {
      def &gt;= (that: Box[T])(implicit ord: Ordering[T]): Boolean = {
        val comp = ord.compare(data, that.data)
        comp &gt;= 0
      }
      def &lt;=[T :Ordering] (that: Box[T]): Boolean = {
        val ord = implicitly[Ordering[T]]
        //compile error in the following code
        val comp = ord.compare(data, that.data)
        comp &lt;= 0
      }
    }
  }
  </code></pre>
  
  <p>However, the T in the &lt;= method is different from the T defined in Box[T], so there is compiling error in &lt;=.(<code>val comp = ord.compare(data, that.data)</code>, data and that.data are different types.)</p>
  
  <p>I would ask if it is possible to around around this problem:</p>
  
  <p>(1)T is defined in Box[T]</p>
  
  <p>(2)Using context bound in the method, like &lt;=</p>