aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/t3373.scala
blob: b6594fb6c7dc78547b674236e0c6da0ddf479758 (plain) (tree)
1
2
3
4
5
6
7
8






                                       
                                                                    


                                                                                            
class Entry(time: Long) {
 def getTime: Long = time
}

object Test {
  def extractTime(e: Entry) = e.getTime

  implicit val orderEntries: Ordering[Entry] = new Ordering[Entry] {
   def compare(first: Entry, second: Entry) = extractTime(first) compare extractTime(second)
  }
}