diff options
Diffstat (limited to 'tests/untried/pos/t7377b.scala')
-rw-r--r-- | tests/untried/pos/t7377b.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/untried/pos/t7377b.scala b/tests/untried/pos/t7377b.scala new file mode 100644 index 000000000..aeee800d5 --- /dev/null +++ b/tests/untried/pos/t7377b.scala @@ -0,0 +1,13 @@ +object Test { + List(1) match { case Nil => 0; case (x::xs) => x } + + case class Foo(a: Int) + val FooAlias: Foo.type = Foo + Foo(0) match { case FooAlias(_) => 0 } + Foo(0) match { case Foo(_) => 0 } + + case class Bar() + val BarAlias: Bar.type = Bar + Bar() match { case BarAlias() => 0 } + Bar() match { case Bar() => 0 } +} |