From 0a5ade5b660e383d8af307eed88ab3513311b412 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 9 Nov 2014 19:11:08 +1000 Subject: SI-5665 Test case for fixed private[this], trait crasher Fixed in SI-5508 / cca4d51db. --- test/files/run/t5665.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/files/run/t5665.scala (limited to 'test/files') diff --git a/test/files/run/t5665.scala b/test/files/run/t5665.scala new file mode 100644 index 0000000000..3ac498b5c0 --- /dev/null +++ b/test/files/run/t5665.scala @@ -0,0 +1,13 @@ +object O { + trait T { + private[this] val c: Int = 42 + def f = + { x: Int => c } + } +} + +object Test { + def main(args: Array[String]): Unit = { + assert(new O.T{}.f(0) == 42) + } +} -- cgit v1.2.3