From 7806112e43776fc812c93ec9cabd5cbd1953c4a6 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 6 Dec 2010 22:39:22 +0000 Subject: Don't transform patterns during superaccessors:... Don't transform patterns during superaccessors: the matcher can't deal with funny trees. Closes #4062, review by dragos. --- test/files/run/bug4062.check | 2 ++ test/files/run/bug4062.scala | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test/files/run/bug4062.check create mode 100644 test/files/run/bug4062.scala (limited to 'test/files') diff --git a/test/files/run/bug4062.check b/test/files/run/bug4062.check new file mode 100644 index 0000000000..1d474d5255 --- /dev/null +++ b/test/files/run/bug4062.check @@ -0,0 +1,2 @@ +false +true diff --git a/test/files/run/bug4062.scala b/test/files/run/bug4062.scala new file mode 100644 index 0000000000..f5478e7593 --- /dev/null +++ b/test/files/run/bug4062.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") + } +} -- cgit v1.2.3