diff options
Diffstat (limited to 'test/pending/run')
-rw-r--r-- | test/pending/run/bug3150.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/pending/run/bug3150.scala b/test/pending/run/bug3150.scala new file mode 100644 index 0000000000..034703b5f7 --- /dev/null +++ b/test/pending/run/bug3150.scala @@ -0,0 +1,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) + } +} |