aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t1503.scala
blob: e172485753431779c66aea3c68c7f0bf9be00042 (plain) (blame)
1
2
3
4
5
6
7
8
object Whatever {
  override def equals(x: Any) = true
}

class Test {
  // when left to its own devices, and not under -Xfuture, the return type is Whatever.type
  def matchWhateverCCE(x: Any) = x match { case n @ Whatever => n }
}