diff options
Diffstat (limited to 'test/files/run/t4062.scala')
-rw-r--r-- | test/files/run/t4062.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t4062.scala b/test/files/run/t4062.scala new file mode 100644 index 0000000000..f5478e7593 --- /dev/null +++ b/test/files/run/t4062.scala @@ -0,0 +1,16 @@ +class A(val f : String) + +class B(f: String) extends A(f) { + def foo(x: String) = x match { + case `f` => true + case _ => false + } +} + +object Test { + def main(args: Array[String]): Unit = { + val b = new B("abc") + println(b foo "bippy") + println(b foo "abc") + } +} |