summaryrefslogblamecommitdiff
path: root/test/files/run/t3150.scala
blob: 8acdb50354a97ba9d7af1a7ed3018e7f02fde304 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                                            
  





                                         
object Test {
  case object Bob { override def equals(other: Any) = true }
  def f(x: Any) = x match { case Bob => Bob }
  
  def main(args: Array[String]): Unit = {
    assert(f(Bob) eq Bob)
    assert(f(0) eq Bob)
    assert(f(Nil) eq Bob)
  }
}