diff options
Diffstat (limited to 'tests/run/t5158.scala')
-rw-r--r-- | tests/run/t5158.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run/t5158.scala b/tests/run/t5158.scala new file mode 100644 index 000000000..34c02c306 --- /dev/null +++ b/tests/run/t5158.scala @@ -0,0 +1,17 @@ +case class B(var x: Int) { + def succ(): Unit = { + x = x + 1 + } +} + +object Test { + def main(args: Array[String]): Unit = { + val b = B(0) + b match { + case B(x) => + //println(x) + b.succ() + println(x) + } + } +} |